This commit is contained in:
2024-03-26 11:15:25 +03:00
parent 4ecfebcd1b
commit 04d946e28c
38 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#include <stdio.h>
int main(void) {
int total = 0;
int grade = 0;
int pass = 0;
int fail = 0;
while(total < 10) {
printf("%s","Enter grade (grades must be 1 or 2 !) ");
scanf("%d", &grade);
if(grade == 1) {
fail = fail + 1;
total = total + 1;
} else if(grade == 2) {
pass = pass + 1;
total = total + 1;
} else {
printf("%s\n","Invalid Number PLEASE ENTER A VALID NUMBER!(1 or 2)");
scanf("%d", &grade);
}
}
puts((pass >= 8) ? "Bonus to Instructer!" : "");
}