Question: Write a C program. Use a while loop for user input values until terminating with either 'q' or 9999 . The program can run to
Write a C program.
Use a while loop for user input values until terminating with either 'q' or 9999. The program can run to quit by inputting q or 9999. Please implement one of them to quit a program from q or 9999, or both. Sum all the input values which are integer, and float numbers, but not minus values. Get an average, biggest value, and smallest value from the input values.
while loop is required to get values (int, float) by a user
sum all input values, calculate the average and find the biggest value and smallest value from the input values
If a user put 'q', stop the while looping to get the input value
Print out the results below for example.
Thank you for coming to our mini calculator!
please enter an integer or float number, q or 9999 to quit: 10
please enter an integer or float number, q or 9999 to quit: 5.5
please enter an integer or float number, q or 9999 to quit: 15.1
please enter an integer or float number, q or 9999 to quit: q or 9999
------------------------------------------------------------
You entered 3 values.
Sum: 30.6 Average: 10.2 Largest value: 15.1 Smallest value: 5.5
-------------------------------------------------------------
5. Submit your C source code file named, pgm2_ITEC4364_yourname.c
6. Submit a screen capture the compile and run your program
7. Your program should compile and run successfully
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
