C# Program to count total characters entered by users - discussing about technology is my hobby, with media blogs
Test All Gadget we can share the knowledge of technology that continues to grow with various ways of use that is intended to simplify your life, now we will discuss first about that in your search that is C# Program to count total characters entered by users please refer to our explanation because we will try to make a complete article for you.
Articles :
C# Program to count total characters entered by users
full Link :
C# Program to count total characters entered by users
Article Csharp,
Article programs,
You can also see our article on:
C# Program to count total characters entered by users
C# Program to Print Entering Characters from users and then Count Total entering characters
Program Statement:
Write a program which takes characters from user until user press ENTER and then program will show the number of words with length greater than or equal to 5.
Solution:
public class length
{
int count1 = 0, count2 = 0;
public void check()
{
Console.Write("\n\t\tEnter string : ");
string ch = Console.ReadLine();
for (int x = 0; x < ch.Length; x++)
{
if (ch[x] == ' ')
{
count1++;
if (x >= 5)
{ count2++; }
}
}
Console.WriteLine("\n\t\tNumber of words with length greater than or equal to 5 : {0}", count2);
Console.WriteLine();
}
}
If you are interested in an advanced Digital marketing course in Ghaziabad you can any time contact us to get more details on the course and take other information like fee and other details
BalasHapusdigital marketing institute in noida
digital marketing course in ghaziabad
seo course in laxmi nagar