Question: Write a C++ program that reads characters (Upper case, Lower case, and Digits ) including white spaces from the keyboard until user enters #. Then,

Write a C++ program that reads characters (Upper case, Lower case, and Digits ) including white spaces from the keyboard until user enters #. Then, your program should count total number of characters, uppercase letters, lowercase letters, and digits. Example of a possible input: Hello, welcome to Tempe. Todays temperature is 117!# Approach: First write the algorithm Come up with a flowchart that represents the program logic. verify your approach with sample data set Develop the program and test it for various inputs Hint: You will need to use selection within the while loop. library has character related functions (Appendix G2,3,4 - CD). Will be discussed during the lab. Also, string data type has a method length() which gives how many characters are stored in the string.

Write a program that reads characters (Upper case, Lower case, and Digits ) including white spaces from the keyboard until user enters #. Then, your program should count total number of characters, uppercase letters, lowercase letters, and digits.

Example of a possible input:

Hello, welcome to Tempe. Todays temperature is 117!#

Approach:

First write the algorithm

Come up with a flowchart that represents the program logic.

verify your approach with sample data set

Develop the program and test it for various inputs

Hint:

You will need to use selection within the while loop.

library has character related functions (Appendix G2,3,4 - CD). Will be discussed during the lab. Also, string data type has a method length() which gives how many characters are stored in the string.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!