Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. main ()
  3.  
  4. {
  5. int i = 1, pis;
  6.  
  7. printf("Napis A!\n");
  8. do {
  9. pis = getchar();
  10. while (getchar() != '\n');
  11. if ((pis != 'A') && (i == 3))
  12. {
  13. printf("Ked si sa netrafil prvy krat, bral som to ako nepozornost, ale ked to bolo treti krat, pochopil som, ze si debil. Chod sa liecit!\n");
  14. break;
  15. }
  16. if (pis != 'A')
  17. printf("Hovoril som A!!! Takze znovu: Napis A!\n");
  18. i++;
  19. } while (pis != 'A');
  20. if (pis == 'A')
  21. printf("Hura, naozaj je to A!\n");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement