Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 213 Weeks Ago, 1 Day Ago |
Questions Answered: | 15833 |
Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
For my intro to C++ programming class
Suggestions for 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. Today's 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.
 <cctype> 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.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly