I have a program that I know I need a string to use. Problem is in class we did a program with strings in which we input one name like "Dan" and another name like "dave" and it would say which is bigger, how many characters are in each ect. This new program I have to ask the user to input a sentecne like.. " This book has ten pages" then it would count the number words and senteces in text. Also I would have to ask the user it for a letter like "a" and it would count the lower and upper case letters. I have a program in VB where i would put "Hello" and it tels me how many times "L" is used. (i cant find that disk :( )
I am not asking for the whole program need help on how to start it and tips to get me along, because im seriously lost about this whole chapter on strings.
Jump to Post
To count the number of words, just count spans of whitespace. Each span of whitespace separates a word. To count the number of sentences, look for punctuation.
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.