This commit is contained in:
2024-02-21 04:52:18 +03:00
parent 5bae8be9fe
commit b9492bb8d7
5 changed files with 71 additions and 0 deletions

20
DeitelC/BonusInstructor.c Normal file
View File

@ -0,0 +1,20 @@
#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;
} else {
pass = pass + 1;
}
total = total + 1;
}
puts((pass >= 8) ? "Bonus to Instructer!" : "");
}