I'm trying see if the input integer is bigger than 100 and less than 0.Code:flag = 1; while(flag == 1) { printf("What is the student's Assignment 1 mark? :"); scanf("%d",&a1); if((a1>100)&&(a1<0)) { printf("Invalid mark. Please enter again\n"); flag = 1; } else { flag = 0; } }
If it's so, then it prints invalid mark and it goes back to input section.
I made the above sample code to test this thing, but it's not working.
Could anyone help me with fixing this problem?