-->
当前位置:首页 > 题库

PROGRAMMING:Character statistics

Luz5年前 (2021-05-10)题库438
The function of the program is to read in a line of characters (including spaces) from the keyboard, and count the number of N1, N2, N3, N4 and N5 of the output string;
For example: input: I am a student. I have 20 years old!
Output: N1 = 2 N2 = 8 N3 = 16 N4 = 8 N5 = 3
.
###Input format:
Enter a line of string, which may contain spaces, ending with enter.
###Output format:
Output a row of N1, N2, N3, N4, N5 values. For example, there are two spaces between the numbers.
###Input example:
Here is a set of inputs. For example:
```in
Are You 20 Years Old? No,No......
```
###Output example:
The corresponding output is given here. For example:
```out
n1=2 n2=6 n3=12 n4=5 n5=8
```







answer:If there is no answer, please comment