#include
#include
#include
void main()
{
char letter; // Letter typed by the user
printf("Do you want to continue? (Y/N): ");
letter = getch(); // Get the letter
letter = toupper(letter); // Convert letter to uppercase
while ((letter != 'Y') && (letter != 'N'))
{
putch(7); // Beep the speaker
letter = getch(); // Get the letter
letter = toupper(letter); // Convert letter to uppercase
}
printf("\nYour response was %c\n", letter);
}
阅读(784) | 评论(0) | 转发(0) |