fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int c;
  5.  
  6. while(1) {
  7. c = getchar();
  8. if (c == '5') {
  9. printf("Mam 5!\n");
  10. } else if (c == EOF) {
  11. printf("To już koniec\n");
  12. break;
  13. } else {
  14. printf("Nie wiem co mam zrobić\n");
  15. }
  16. }
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 9432KB
stdin
53
stdout
Mam 5!
Nie wiem co mam zrobić
To już koniec