Question: Write a C console program that uses a sentinel-controlled loop to continuously prompt the user for integers to process. A sentinel value is a special
Write a C console program that uses a sentinel-controlled loop to continuously prompt the user for integers to process. A sentinel value is a special value that the user enters when finished entering input For this program zero is the sentinel value When the user enters a zero into the program, it should cause the loop to terminate. The program should calculate statistics about the integers that are input and display the results after the loop finishes. Compute and display the following Number of positive integers Number of negative integers Number of odd integers Number of even integers Sum of all the integers Average of the integers (2 decimal places of precision) Watch out for integer division
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
