Question: Integers seedVal, minValue and maxvalue are read from input. srand ( ) is called with seedval as the seed. minvalue and maxValue represent the range

Integers seedVal, minValue and maxvalue are read from input. srand() is called with seedval as the seed. minvalue and maxValue
represent the range of numbers that can be picked on a lottery ticket. Assign variables lottery 1 and lottery 2 each with a random
number between minvalue and maxvalue, both inclusive.
Click here for example
Ex: If minvalue is 15 and maxvalue is 45, then one possible output is:
42
25
7 int minvalue;
int maxvalue;
int lottery1;
int lottery 2 ;
cin seedval;
cin minvalue;
cin maxvalue;
srand(seedval);
V/ Generate random numbers within the specified range
lottery 1= rand ()%(minvalue - maxvalue +1
 Integers seedVal, minValue and maxvalue are read from input. srand() is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!