Program output

The program displays the following output for several user input values:

 

Enter an upper-case letter: @
Bad input
Enter an upper-case letter: [
Bad input
Enter an upper-case letter: A
Thanks for the A