File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ int main(){
25
25
srand (time (NULL ));
26
26
27
27
//Declaring the variables we want to use
28
- int x ; // returns a pseudo-random integer between 1 and 50 instead of RAND_MAX
29
- int y ; // returns a pseudo-random integer between 0 and 50 instead of RAND_MAX
28
+ int x ; // returns a pseudo-random integer between 1 and 10 instead of RAND_MAX
29
+ int y ; // returns a pseudo-random integer between 0 and 10 instead of RAND_MAX
30
30
int answer ;
31
31
char userInput ;
32
32
int correct = 0 ;//the number of questions the user got correct
@@ -39,8 +39,8 @@ int main(){
39
39
for (i = 0 ; i < numQuestions ; i ++ ){
40
40
41
41
//Create two random numbers to multiply together
42
- x = rand ()%10 + 1 ; // returns a pseudo-random integer between 1 and 50 instead of RAND_MAX
43
- y = rand ()%10 + 0 ; // returns a pseudo-random integer between 0 and 50 instead of RAND_MAX
42
+ x = rand ()%10 + 1 ; // returns a pseudo-random integer between 1 and 10 instead of RAND_MAX
43
+ y = rand ()%10 + 0 ; // returns a pseudo-random integer between 0 and 10 instead of RAND_MAX
44
44
answer = x * y ;
45
45
46
46
//Print question number 'i'
You can’t perform that action at this time.
0 commit comments