subject

2.31 lab: simple statistics part 1 given 3 integers, output their average and their product, using integer arithmetic. ex: if the input is: 10 20 5 the output is: 11 1000 note: integer division discards the fraction. hence the average of 10 20 5 is output as 11, not 11.6667. 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), until you complete part 2 below. part 2 also output the average and product, using floating-point arithmetic. output each floating-point value with two digits after the decimal point, which can be achieved by executing cout < < fixed < < setprecision(2); once before all other cout statements. ex: if the input is: 10 20 5 the output is: 11 1000 11.67 1000.00 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, 22.06.2019 15:00
Who is the first president to use social media as part of his campaign strategy
Answers: 1
question
Computers and Technology, 23.06.2019 00:20
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
You know the right answer?
2.31 lab: simple statistics part 1 given 3 integers, output their average and their product, using...
Questions
question
Mathematics, 20.10.2020 21:01
question
Mathematics, 20.10.2020 21:01
Questions on the website: 13722361