Skip to content

Commit dc261f3

Browse files
Update multiplication_problems_solutions.c
1 parent 72f2f1b commit dc261f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

multiplication_problems_solutions.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ int main(){
2525
srand(time(NULL));
2626

2727
//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
3030
int answer ;
3131
char userInput;
3232
int correct=0;//the number of questions the user got correct
@@ -39,8 +39,8 @@ int main(){
3939
for(i=0; i<numQuestions; i++){
4040

4141
//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
4444
answer = x * y;
4545

4646
//Print question number 'i'

0 commit comments

Comments
 (0)