Question: 3 . 1 6 LAB: Simple statistics Part 1 Given 3 integers, output their sum, average, and product, using integer arithmetic. Ex: If the input

3.16 LAB: Simple statistics
Part 1
Given 3 integers, output their sum, average, and product, using integer arithmetic.
Ex: If the input is 10205, the output is:
35111000
Note: Integer division discards the fraction. Hence the average of 10205 is output as 11, not 11.6667.
Note: Remember to declare 3 integer variables
Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 and 3 below.
Part 2
Also output the sum, average and product, using floating-point arithmetic.
Ex: If the input is 10205, the output is:
35111000
3511.66671000
Note that fractions aren't discarded.
Part 3
Finally, output the distance of each number from the average, using integer arithmetic.
Ex: If the input is 10205, the output is:
35111000
3511.66671000
196
In C++ code

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!