Answer in C! 5.19 LAB: Warm up: People's weights Output each floating-point value with two digits after the decimal poi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Answer in C! 5.19 LAB: Warm up: People's weights Output each floating-point value with two digits after the decimal poi

Post by answerhappygod »

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);
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply