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 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Creating "smart interfaces" in all sectors of industry, government, and the public arena is one of the fastest growing hct areas. these interfaces model, interpret, and analyze such human characteristics as speech, gesture, and vision. the field of biometrics, in which humans authenticate themselves to machines, is an area of considerable interest to hct practitioners. fingerprint scans are one of the most frequently used biometric options, and this article, biometric student identification: practical solutions for accountability & security in schools, makes a case for the implementation of fingerprint scans in schools. critique the article, and answer the following questions: according to the author, what are the main benefits of adopting fingerprint scans in schools for student identification? according to the author, what are the main drawbacks of adopting fingerprint scans in schools for student identification? do you agree with the author's assessment of the pl
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
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
Health, 13.02.2021 14:00
Questions on the website: 13722361