subject
Business, 12.04.2021 23:30 BonnyRios

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. (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in a vector of doubles. Output the vector's numbers on one line, each number followed by one space. (2 pts)
Enter weight l:
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 vector's elements. (1 pt)
(3) Also output the average of the vector's elements. (1 pt)
(4) Also output the max vector 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 89.50 142.00 166.30 93.00
Total weight: 726.80
Average weight: 145.36
Max weight: 236.00
LAB 6.26.1: LAB: Warm up: People's weights (Vectors) 0/60 main. cpp Load default template...

ansver
Answers: 3

Another question on Business

question
Business, 22.06.2019 08:00
Interest is credited to a fixed annuity no lower than the variable contract rate contract guaranteed rate current rate of inflation prime rate
Answers: 2
question
Business, 22.06.2019 09:30
Which are the best examples of costs that should be considered when creating a project budget?
Answers: 2
question
Business, 23.06.2019 01:00
The notarial evidence form is completed by
Answers: 2
question
Business, 23.06.2019 01:00
Sarah is an accountant with desires to open her own business. she is looking for office space at a reasonable rate along with internet service. of the conditions that need to be put in place for the entrepreneurial ecosystem, she needs
Answers: 1
You know the right answer?
Output each floating-point value with two digits after the decimal point, which can be achieved by e...
Questions