/*Testing letters using and */
#include <stdio.h>
void main()
{
char letter =0; /* Stores an input character */
printf("Enter an upper case letter:");
scanf(" %c", &letter); /* Read the input character */
if ((letter >= 'A') && (letter <= 'Z')) /* Verify uppercase letter */
{
letter += 'a'-'A'; /* Convert to lowercase */
printf("Your enter is %c.\n", letter);
}
else
printf("An uppercase letter please.\n");
}
|