Mathematics
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

answer
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 17:30, josh3419
Adriver from the university of florida women’s swimming and diving team is competing in the in ncaa zone b championships
Answers: 3
image
Mathematics, 21.06.2019 19:00, legacieenglish
Abarbecue sold 26 hamburgers and hot dogs. hamburgers sell for $3.50 each and hot dogs sell for $2.00 each. if the barbecue made $70 in sales, determine and state the number of hot dogs sold.
Answers: 1
image
Mathematics, 21.06.2019 20:30, Courtneymorris19
Barney & noblet customers can choose to purchase a membership for $25 per year members receive 10% off all store purchases 1. how much would a member pay per year if he bought $50 worth of items each year? 2. write a slope-intercept equation that expresses how much a member pays per year using x to represent his purchases per year 3. how much would a member have to spend per year to pay off his membership fee?
Answers: 1
image
Mathematics, 21.06.2019 21:00, famouzgal
Jordan got 27 out of 90 correct on his test . what fraction of the marks did her get correct
Answers: 2
Do you know the correct answer?
2.31 lab: simple statistics part 1 given 3 integers, output their average and their product, using...

Questions in other subjects: