subject
Mathematics, 09.10.2019 19:00 celestemaria0727

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. lab

ansver
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 16:00, aidengalvin20
Plz i beg u asap ! what is the equation of this graphed line? enter your answer in slope-intercept form in the box.
Answers: 2
image
Mathematics, 21.06.2019 18:30, jayqq5746
Ineed me i stuck and i don’t want to get it wrong
Answers: 1
image
Mathematics, 21.06.2019 19:10, niyah2x3
What are the coordinates of the point that is 1/3 of the way from a to b? a (2,-3) b (2,6)
Answers: 3
image
Mathematics, 21.06.2019 20:30, ultimatesaiyan
Answer asap ill give ! ’ a sample of radioactive material decays over time. the number of grams, y , of the material remaining x days after the sample is discovered is given by the equation y = 10(0.5)^x. what does the number 10 represents in the equation? a. the half-life of the radioactive material, in days b. the amount of the sample, in grams, that decays each day c. the time, in days, it will take for the samples to decay completely d. the size of the sample, in grams, at the time the material was discovered
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 in other subjects:

Konu
History, 12.02.2020 18:20