Answer in C! 5.19 LAB: Warm up: People's weights Output each floating-point value with two digits after the decimal poi
Posted: Fri Jul 01, 2022 5:34 am
Answer in C!5.19 LAB: Warm up: People's weights
Output each floating-point value with two digits after thedecimal point, which can be achieved as follows:printf("%0.2lf", yourValue);
(1) Prompt the user to enter five numbers, being five people'sweights. Store the numbers in an array of doubles. Output thearray's numbers on one line, each number followed by one space. (2pts)Ex:
(2) Also output the total weight, by summing the array'selements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)
Ex:
Output each floating-point value with two digits after thedecimal point, which can be achieved as follows:printf("%0.2lf", yourValue);
Output each floating-point value with two digits after thedecimal point, which can be achieved as follows:printf("%0.2lf", yourValue);
(1) Prompt the user to enter five numbers, being five people'sweights. Store the numbers in an array of doubles. Output thearray's numbers on one line, each number followed by one space. (2pts)Ex:
(2) Also output the total weight, by summing the array'selements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)
Ex:
Output each floating-point value with two digits after thedecimal point, which can be achieved as follows:printf("%0.2lf", yourValue);