2.9. Exercises
1: | Write a C++ program that reads characters from your keyboard, up to a newline character. Display the following information:Number of uppercase characters. Number of lowercase characters. Number of digits. Number of other characters. Total number of characters. |
2: | Write a C++ program that displays the sequence2 4 6 8 10 20 22 24 26 28 30 40 42 44 46 48 50 60 using only a for loop, the conditional operator (?:), and cout statements. |
3: | Write a C++ program that populates a two-dimensional array with integers, 1 through 50. Use a pointer to print out the values stored in the array. Have your program produce the following output.1 2 3 4 ... |
Get Navigating C++ and Object-Oriented Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.