Tech News World, Contacts Samsung Galaxy, Windows 8, Nokia Lumia, Quad Core Smart Phones, HTC smartphone, Google Nexus, MacBook, PayPal

Tuesday, December 24, 2013

C# Program to count total characters entered by users

C# Program to count total characters entered by users - Although I work in the office and a lot of work that makes me tired but still I make a blog Tech News World and still will update it for you because this is part of my hobby who likes the world of technology, especially about the gadget, now we will discuss first about C# Program to count total characters entered by users because it is the topic that you are now looking for, please refer to the information I provide in the guarantee 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();
}
}




so much information about C# Program to count total characters entered by users

hopefully information C# Program to count total characters entered by users can provide useful knowledge for you in getting information about the latest gadgets,

just finished your reading article about C# Program to count total characters entered by users if you feel this article useful for you please bookmark or share using link http://aziin5teens.blogspot.com/2013/12/c-program-to-count-total-characters.html for more people know

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : C# Program to count total characters entered by users

0 comments:

Post a Comment