Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Lab: Using Vectors Coach Blue wants to keep track of the total, average and max weight of the players on his wrestling team. He

image text in transcribedimage text in transcribed

C++ Lab: Using Vectors Coach Blue wants to keep track of the total, average and max weight of the players on his wrestling team. He asks you to write a program that will prompt the user ( Coach Blue ) for all 12 players weights. He does not need to you store any additional information (other than the weights). The program should then output for him, the total weight, the average weight and the maximum weight. Specifications The weights should be stored in a vector of doubles. The vector's doubles must be output on one line, each number followed by a space. Also output the total weight. Also output the average of the vector's elements. Also output the max vector element. Sample output: Sample output: Enter weight 1: 124.5 Enter weight 2: 187.5 Enter weight 3: 198.3 Enter weight 4: 134.8765 Enter weight 5: 283 Enter weight 6: 156.8 Enter weight 7: 188.4 Enter weight 8: 178.8988 Enter weight 9: |123.2 Enter weight le: 198 Enter weight 11: 261.3456 Enter weight 12: 125 You entered: 124.5 187.5 198.3 134.876 283 156.8 188.4 178.891 123.2 198 201.346 125 Total weight: 2011.81 Average weight: 167.651 Max Weight: 203

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

Students also viewed these Databases questions

Question

Consider this article:...

Answered: 1 week ago