- #include <stdio.h>
- #include <ctype.h>
- void main(void)
- {
- int letter;
- printf("Type Y or N to continue and press Entern");
- do {
- letter = toupper(getchar());
- } while ((letter != 'Y') && (letter != 'N'));
- printf("You typed %cn", ((letter == 'Y') ? 'Y': 'N'));
- }