So this is part of my code to create and arithmetic game, it will ask for the maximum number you'd like for an addition game. Every time you get the answer correct you get a point. I have the code spitting out teh random numbers but it wont output if the answer is correct it only prints out if its incorrect. Please help if you can any help is appreciated.....

Code:switch(choice){ case 1: printf("What is the maximum number you'd like?\n"); scanf("%d", &maxnum); for (i=0; i<10; i++){ srand(time(0)); x = rand() % maxnum; y = rand() % maxnum; printf("What is %d+%d\n", x, y); scanf("%d" , answer); correct = x+y; if (answer == correct){ printf("Correct, great job!\n"); count1++; score += count1; } else printf("Sorry, that's incorrect, the answer is %d\n", correct); }//end case1 for break;