just a piece of the codeCode:case 1: ///////////////EASY MATH printf("EASY\n"); if (x1==0){ printf("1 + 6\n");scanf("%d",&a1[0]);} if (x1==1){ printf("2 + 3\n");scanf("%d",&a1[1]);} if (x1==2){ printf("2 + 7\n");scanf("%d",&a1[2]);} if (x1==3){ printf("7 + 4\n");scanf("%d",&a1[3]);} if (x1==4){ printf("6 + 9\n");scanf("%d",&a1[4]);} if (x2==0){ printf("1 + 2\n");scanf("%d",&a2[0]);} if (x2==1){ printf("1 + 3\n");scanf("%d",&a2[1]);} if (x2==2){ printf("1 + 4\n");scanf("%d",&a2[2]);} if (x2==3){ printf("9 + 4\n");scanf("%d",&a2[3]);} if (x2==4){ printf("3 + 7\n");scanf("%d",&a2[4]);} if (x3==0){ printf("7 - 5\n");scanf("%d",&a3[0]);} if (x3==1){ printf("9 - 6\n");scanf("%d",&a3[1]);} if (x3==2){ printf("3 - 1\n");scanf("%d",&a3[2]);} if (x3==3){ printf("2 - 2\n");scanf("%d",&a3[3]);} if (x3==4){ printf("9 - 2\n");scanf("%d",&a3[4]);} if (x4==0){ printf("6 * 6\n");scanf("%d",&a4[0]);} if (x4==1){ printf("9 * 2\n");scanf("%d",&a4[1]);} if (x4==2){ printf("2 * 6 \n");scanf("%d",&a4[2]);} if (x4==3){ printf("4 * 8\n");scanf("%d",&a4[3]);} if (x4==4){ printf("7 * 6\n");scanf("%d",&a4[4]);} if (x5==0){ printf("6 / 6\n");scanf("%d",&a5[0]);} if (x5==1){ printf("9 / 3\n");scanf("%d",&a5[1]);} if (x5==2){ printf("30 / 6 \n");scanf("%d",&a5[2]);} if (x5==3){ printf("100 / 10\n");scanf("%d",&a5[3]);} if (x5==4){ printf("54/ 9\n");scanf("%d",&a5[4]);} //ans EASY MATH /////1 if (a1[0]==7){ score++;} if (a1[1]==5){ score++;} if (a1[2]==9){ score++;} if (a1[3]==11){ score++;} if (a1[4]==15){ score++;} ////2 if (a2[0]==3){ score++;} if (a2[1]==4){ score++;} if (a2[2]==5){ score++;} if (a2[3]==13){ score++;} if (a2[4]==10){ score++;} ////3 if (a3[0]==2){ score++;} if (a3[1]==3){ score++;} if (a3[2]==2){ score++;} if (a3[3]==0){ score++;} if (a3[4]==7){ score++;} //////////////4 if (a4[0]==36){ score++;} if (a4[1]==18){ score++;} if (a4[2]==12){ score++;} if (a4[3]==32){ score++;} if (a4[4]==42){ score++;} ///////5 if (a5[0]==1){ score++;} if (a5[1]==3){ score++;} if (a5[2]==5){ score++;} if (a5[3]==10){ score++;} if (a5[4]==6){ score++;} printf("you got %d out of 5\n",score); if (add==0){printf("Study more about Addition\n");} if (sub==0){printf("Study more about Subtraction\n");} if (mul==0){printf("Study more about Multiplication\n");} break;//EASY MATH

This is a 5 item quiz program...

the problem is that when you got a perfect score.. it will display you got 6 out 5...which is I cant tell why... please help.. thanks

note: already set the score to 0.