Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete C++ program and Please include comments to explain what you did thankyou! Use C++'s Random Number Generator (RNG to generate random windspeed
Write a complete C++ program and Please include comments to explain what you did thankyou!
Use C++'s Random Number Generator (RNG to generate random windspeed values, and print the Beaufort Wind Category for each value. The sample program random_and_clock_cpp will help with this part of the assignment. The Beaufort Wind Scale (https://en wikipedia.org/wiki/Beaufort scale) defines 12 wind categories: 73 hurricane Using a for loop, use rand() to generate 10 random windspeed values between 0 and 100, and print the wind speed and the Beaufort Wind Scale label for each value. Once you have that working, add a few lines of code to prompt the user for a seed value, and run your program several times, seeding the RNG with different values. If you use the seed value of 1, you should get the same random sequence that you got in part 1. If you use a different seed (say, 100) you should get a difference sequence; if you run again with the same seed, you should get that same sequence. Modify your program so if the user gives you a negative number for the seed, you seed the RNG from the system clock (see the sample program)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started