Question
question 1 Suppose you are writing a program that will use the C/C++ random number generator. Show the #include statements that are necessary for your
question 1
Suppose you are writing a program that will use the C/C++ random number generator.
Show the #include statements that are necessary for your program.
Show the code you would use to initialize (or "seed") the random number generator. (Show only the statement or statements necessary that you would include in your main function.)
question 2
Suppose you have three int variables declared as follows:
int x, y, z;
Write the code necessary to do the following:
Assign a random number to x.
Assign a random one-digit number (value in range 0 to 9) to y;
Assign a random two-digit number (value in range 10 to 99) to z;
You may assume that the random number generator has been properly initialized. Give only three assignment statements
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