Question: Using a C++ Sentinel-controlled while loop, write a program that reads characters from the keyboard until zero is read and then displays the number
Using a C++ Sentinel-controlled while loop, write a program that reads characters from the keyboard until zero is read and then displays the number (count) of lowercase and uppercase characters. Moreover, the program should ignore all other characters. Sample Input / Output: Enter a character or enter '0' to finish: t Enter a character or enter '0' to finish: Q Enter a character or enter '0' to finish: r Enter a character or enter '0' to finish: 7 Enter a character or enter '0' to finish: # Enter a character or enter '0' to finish: p Enter a character or enter '0' to finish: A Enter a character or enter '0' to finish: 0 Your input contains 3 lower letters and 2 upper letters Enter a character or enter '0' to finish: + Enter a character or enter '0' to finish: 5 Enter a character or enter '0' to finish: Enter a character or enter '0' to finish: 0 Your input contains 0 lower letters and 0 upper letters -
Step by Step Solution
There are 3 Steps involved in it
The question is asking to write a C program that uses a Sentinelcontrolled while loop to read charac... View full answer
Get step-by-step solutions from verified subject matter experts
