Computers and Technology
Computers and Technology, 01.07.2020 15:01, mdarter

LAB: Warm up:
People's weights Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
printf("%0.2lf", yourValue);
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts)
Ex:
Enter weight 1: 236.0
Enter weight 2: 89.5
Enter weight 3: 142.0
Enter weight 4: 166.3
Enter weight 5: 93.0
You entered: 236.00 89.50 142.00 166.30 93.00
(2) Also output the total weight, by summing the array's elements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)
Ex:
Enter weight 1: 236.0
Enter weight 2: 89.5
Enter weight 3: 142.0
Enter weight 4: 166.3
Enter weight 5: 93.0
You entered: 236.00

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:00, breella0
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
image
Computers and Technology, 23.06.2019 16:10, alexis9658
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
image
Computers and Technology, 24.06.2019 07:50, treytonmesser
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u. s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
Do you know the correct answer?
LAB: Warm up:
People's weights Output each floating-point value with two digits after the de...

Questions in other subjects: