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, 21.06.2019 22:00
Which one of the following would administrators use to connect to a remote server securely for administration? a. telnetb. secure file transfer protocol (sftp)c. secure copy (scp)d. secure shell (ssh)
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
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
Mathematics, 11.02.2022 19:00
question
Mathematics, 11.02.2022 19:00
question
English, 11.02.2022 19:00
Questions on the website: 13722363