Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Part 2: Average of 5 random numbers This first program will generate 5 random numbers between 1 and 100 (inclusive), print them out,

image text in transcribedIn C++

Part 2: Average of 5 random numbers This first program will generate 5 random numbers between 1 and 100 (inclusive), print them out, and then output their average rounded to 2 decimal places. See the comments in randomAvg.cpp for hints on what to do. Consult the documentation if you want to know more about the rand() function, and remember that you can use setprecision to do the rounding. Here are some sample runs of my solution-remember that it'll be different every time you run it because of the randomness! This is the style of output that your program should have: solution ./randomAvg Random numbers between 1 and 100: 17 48 4 62 66 Average: 39.40 solution ./randomAvg Random numbers between 1 and 100: 78 84 63 47 4 Average: 55.20 solution

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

=+ Does it speak to you in a personal way? Does it solve a problem?

Answered: 1 week ago