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
This is not a factor that you should use to determine the content of your presentation. your audience your goals your purpose your technology
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
question
Computers and Technology, 24.06.2019 21:50
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
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, 09.03.2021 23:20
question
Mathematics, 09.03.2021 23:20
question
Mathematics, 09.03.2021 23:20
question
Mathematics, 09.03.2021 23:20
question
Mathematics, 09.03.2021 23:20
Questions on the website: 13722359