Design and implement a easy C++ program with array and string read in a whole line of
Fantastic news! We've Found the answer you've been seeking!
Question:
Design and implement a easy C++ program with array and string
- read in a whole line of characters as the input string;
- count and display how many times
- how frequently (among the letters) each (case insensitive) letter appears in the above mentioned input string;
Sample program execution:
An example of executing such a program is shown below. Note that the user input is in italic font.
Please enter a line of characters:This is a really long line of characters! There are 41 characters in the input line. And among them, 33 are letters. letter number frequency A 4 0.121212 B 0 0 C 2 0.0606061 D 0 0 E 3 0.0909091 F 1 0.030303 G 1 0.030303 H 2 0.0606061 I 3 0.0909091 J 0 0 K 0 0 L 4 0.121212 M 0 0 N 2 0.0606061 O 2 0.0606061 P 0 0 Q 0 0 R 3 0.0909091 S 3 0.0909091 T 2 0.0606061 U 0 0 V 0 0 W 0 0 X 0 0 Y 1 0.030303 Z 0 0
Related Book For
Posted Date: