Question: Programming Challenge # 1 5 , Math Tutor Re - write your solution to this problem using the following, 1 . Use the integer 5

Programming Challenge #15, Math Tutor
Re-write your solution to this problem using the following,
1. Use the integer 521 as the seed for the random number generator.
2. The random numbers to be added must be in the inclusive range [1,9].
From the following choices, pick the correct code to make the above two changes.
srand(521);
int num1=1+ rand()%9;
int num2=1+ rand()%9;
srand(521);
int num1=1+ rand()%10;
int num2=1+ rand()%10;
srand( seed );
int num1=1+ rand()%9;
int num2=1+ rand()%9;
srand( seed );
int num1=1+ rand()%10;
int num2=1+ rand()%10;

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 Programming Questions!