Create a program that satisfy the following requirements:
1. Ask user to enter integer numbers, one at a time.
2. If the number is -1, stop entering number.
3. Print out the total number that is greater than 18.
For example:
The following is screen shot when user enters the sentence “computer science is great”.
enter an integer:
13
enter an integer:
2
enter an integer:
21
enter an integer:
40
enter an integer:
-1
Total number that is greater than 18: 2
Comments
Leave a comment