Question: Write a c++ program that takes in numbers from the standard input and returns the sum and average. The user decide how many numbers are
Write a c++ program that takes in numbers from the standard input and returns the sum and average. The user decide how many numbers are put in!!!
Example of run:
$ g++average.cpp -o average && ./average
2
3
4
2
The sum is : 11
The average is : 2.75
Another example of run
$ g++average.cpp -o average && ./average
4
6
5
5
5
11
The sum is : 36
The average is : 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
