Code Snippets C

#include
int main(void)
{
int answer, j;
int again;
for(j = 1; j < 11; j++) {
printf("What is %d + %d? ", j, j);
scanf("%d", &answer);
if(answer == j + j)
printf("Right!\n");
else {
printf("Wrong\n");
printf("Try again.\n ");
printf("\nWhat is %d + %d? ", j, j);
scanf("%d", &answer);
/* nested if */
if(answer == j + j)
printf("Right!\n");
else
printf("Wrong, the answer = %d\n", j + j);
}
}
return 0;
}