Question: write a program that reads positive numbers from the user and stores them in a list. The sentinel value is any negative number. next, process

 write a program that reads positive numbers from the user and

write a program that reads positive numbers from the user and stores them in a list. The sentinel value is any negative number. next, process the list and print a) the number ofeven ints in the given list. Note: the %"mod" operator computes the remainder, e.g. 5 % 2 is 1. Example1, enter number and -1 to end: 2 enter number and-1 to end: 1 enter numberand-1 to end: 2 enter numberand-1 to end: 3 enter number and-1 to end: 4 enter number and-1 to end:-1 Total even numbers: 3 Example2 enter numbers and -1 to end: 1 enter number and-1 to end: 3 T enter number and-1 to end: 5 enter numberand-1 to end: -1 Total even numbers: 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!