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 16:30
Why are there so many types of diversion programs for juveniles
Answers: 2
question
Business, 22.06.2019 17:10
Storico co. just paid a dividend of $3.15 per share. the company will increase its dividend by 20 percent next year and then reduce its dividend growth rate by 5 percentage points per year until it reaches the industry average of 5 percent dividend growth, after which the company will keep a constant growth rate forever. if the required return on the company’s stock is 12 percent, what will a share of stock sell for today?
Answers: 1
question
Business, 23.06.2019 02:30
Do you think it ethical and appropriate for marshall to have used himself as a test subject and swallowed a sample of helicobacter pylori? what precautions did he take? would you do it? why or why not?
Answers: 1
question
Business, 23.06.2019 12:50
Of the following combinations of financial instruments, which depicts the correct ranking of high to low risk (moving from left to right)? commercial paper; preferred stock; bankers' acceptances state & local government bonds; u.s. treasury bonds; aaa-rated corporate bonds common stock; leases; u.s. treasury notes preferred stock; common stock; u.s. treasury bills
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
question
Arts, 22.12.2020 22:50
question
Mathematics, 22.12.2020 22:50
question
Social Studies, 22.12.2020 22:50
question
Mathematics, 22.12.2020 22:50
question
Mathematics, 22.12.2020 22:50
Questions on the website: 13722363