Question: Given 3 integers, output their sum, average, and product, using integer arithmetic. Ex: If the input is 10205 , the output is: 35111000 Note: Integer

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: Note: The test cases include three very large input values whose product results in overflow. You do not need to do anything special, but just observe that the output does not represent the correct product (in fact, three positive numbers yield a negative output; wow) Submit the above for grading. Your program will fail the last test cases (which is expected), untilyou complete part 2 and 3 below. Part 2 Also cutput the sum, average and product, using floating-point arithmetic. Ex. If the input is 10205 , the output is: 35351111.666710001000 Note that fractions arent discarded, and that overflow does not occur for the test case with large values. Part 3 Finally, output the distance of each number from the average, using integer arithmetic Ex If the input is 10205 , the output is: 3535191111.6667610001000 Note: All numbers are positive and use the integer average (ex(2011)=9 not (2011.6667)=8.3333=8 Note All numbers are positive and use the integer average ( ex: (2011)=9 not (2011.6667)=8.3333=8 \begin{tabular}{l|l} \hline AB & 2 23.1. LAB, Simple statistics \end{tabular} main.cpp 1 \#include ciostreams 2 \#include main(){ 6. 7 Type your code here. % 98 10 11 12 return : 13]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
