subject

Using the For loop Just like the while and the do-while loop, a for loop allows you to repeat your codes for the desired number of times. In this program, you will count the number of letters of the alphabet, digits, whitespaces and special characters in a user entered string. You need to have three separate counters for the uppercase letters, the lowercase letters and the total number of letters. Any character that is not a letter, a digit or a whitespace is a special character.
To complete this program:
• Using a suitable message, get a string from the user. Note that the string may contain more than one word.
• Inside a while loop, test each character by processing each character of the string one at a time. Think about initialization, termination and update conditions for this loop.
• If it is a letter of the alphabet, a digit or a whitespace, update appropriate counters. If it is neither of them, update the counter for the special characters. Inform the user about all the counts.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Mastercard managers are motivated to increase (1) the number of individuals who have and use a mastercard credit card, (2) the number of banks and other clents who issue mastercards to customers and/or employees, and (3) the number of locations that accept mastercard payments. discuss how mastercard could use its data warehouse to it expand each of these customer bases.
Answers: 3
You know the right answer?
Using the For loop Just like the while and the do-while loop, a for loop allows you to repeat your...
Questions
question
Social Studies, 17.07.2019 06:30
Questions on the website: 13722367