Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main ()
- {
- int i = 1, pis;
- printf("Napis A!\n");
- do {
- pis = getchar();
- while (getchar() != '\n');
- if ((pis != 'A') && (i == 3))
- {
- 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");
- break;
- }
- if (pis != 'A')
- printf("Hovoril som A!!! Takze znovu: Napis A!\n");
- i++;
- } while (pis != 'A');
- if (pis == 'A')
- printf("Hura, naozaj je to A!\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement