my/c/l4.c
2026-05-07 14:48:02 +03:00

23 lines
No EOL
462 B
C

#include <stdio.h>
int main() {
int x = 7;
int s = 0;
while(1) {
int pol;
printf("Number ");
scanf("%d", &pol);
if(pol == 7) {
printf("the number is guessed\n");
break;
}
else {
printf("the number is not guessed\n");
s++;
if(s == 3) {
printf("Game over\n");
break;
}
}
}
return 0;
}