Info C# Program to count total characters entered by users - this blog we have built from a few years ago and already very much information about gadgets that we convey and a lot of blog visitors
New Blog Techno News who are satisfied with the information, we will always try to update the latest information for you, first about Info C# Program to count total characters entered by users many already we collect data to make this article so you do not miss the news, please see:
Articles :
Info C# Program to count total characters entered by users
full Link :
Info C# Program to count total characters entered by users
Article Csharp,
Article programs,
You can also see our article on:
Info 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();
}
}
articles Info C# Program to count total characters entered by users finished in discussion
hopefully the information we convey about Info C# Program to count total characters entered by users can benefit you in getting new knowledge about technology,
you just finished reading the information Info C# Program to count total characters entered by users we hope this informmation can answer the question you submit to googlle, if you want to bookmark or share please use link https://moymoycikukecik.blogspot.com/2013/12/info-c-program-to-count-total.html and do not forget to always visit this blog to get the latest information every day.
Tag :
Csharp,
programs,
0 komentar:
Posting Komentar