subject

LAB: Simple statisticsGiven 4 integers, output their product and their average, using integer arithmetic. Ex: If the input is: 8 10 5 4 the output is: 1600 6 Note: Integer division discards the fraction. Hence the average of 8 10 5 4 is output as 6, not 6.75. Note: The test cases include four 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, four positive numbers yield a negative output; wow). Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 below. Part 2 Also output the product and average, using floating-point arithmetic. Output each floating-point value with three digits after the decimal point, which can be achieved by executing cout << fixed << setprecision(3); once before all other cout statements. Ex: If the input is: 8 10 5 4 the output is: 1600 6 1600.000 6.750 Note that fractions aren't discarded, and that overflow does not occur for the test case with large values.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
The blank is type of decision-maker who over analyzes information
Answers: 3
question
Computers and Technology, 22.06.2019 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
LAB: Simple statisticsGiven 4 integers, output their product and their average, using integer arithm...
Questions
question
Mathematics, 07.02.2021 02:50
question
Mathematics, 07.02.2021 02:50
question
Health, 07.02.2021 02:50