Write a complete C++ program that does the following. and please include the com
ID: 3864577 • Letter: W
Question
Write a complete C++ program that does the following. and please include the 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 (http scale) defines 12 s://en.wikipedia.org/wiki/Beaufort wind categories: 1mph calm 1-3 ght air 4-7 ight breeze 8-12 gentle breeze 13-18 moderate breeze 19-24 fresh breeze 25-31 strong breeze 32-38 high wind 39-46 gale 47-54 severe gale 55-63 Storm 64-72 violent storm >73 hurricane Assignment 1: 1) Using a for loop, use rand() to generate 10 random windspeed values between 0 and 100, and print the wind speed and theBeaufort Wind Scale label for each value. 2) 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. a) If you use the seed value of 1, you should getthe same random sequence that you got in part 1. b) 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. 3) 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). name your program random winds cppExplanation / Answer
#include #include /* function main begins program execution */ int main(void) { int i; /* counter */ /* loop 20 times */ for (i = 1; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.