Question: Write a program ( FunNumbers) that reads in a sequence of integer inputs (have it end with -999 as the input). It should then print
Write a program (FunNumbers) that reads in a sequence of integer inputs (have it end with -999 as the input). It should then print out (not including -999 as data)
- The smallest and largest integers that were entered
- The number of even and odd integers that were entered
- The cumulative total
If you have not programmed before, assume the numbers are between 0 and 100 inclusively. If you have programmed before, the numbers can be any integer SAMPLE OUTPUT:
Trial 1 Please enter a number (-999 to end): -999 Thanks for playing. You did not enter any numbers. Trial 2 Please enter a number (-999 to end): -400 Please enter a number (-999 to end): -999 Thanks for playing. You entered 1 numbers. Lowest number: -400 Highest number: Number of odds: 0 Number of evens: 1 Cumulative total: -400 -400 Trial 3 Please enter a number (-999 to end): 40 Please enter a number (-999 to end): -37 Please enter a number (-999 to end): @ Please enter a number (-999 to end): -999 Thanks for playing. You entered 3 numbers. Lowest number: -37 Highest number: 40 Number of odds: 1 Number of evens: 2 Cumulative total: 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
