/* * chardec1.c */ #include int main(void) { char xx; printf("ASCII Example\n"); printf("Please ender a lower case letter: "); scanf("%c", &xx); // only allow letters if (xx<97 || xx>122) { printf("That is not a lower case letter!\n"); return 1; } printf("\nThe ASCII number of %c is %d\n", xx, xx); printf("The corresponding upper case letter is: %c \n", xx-32); return 0; }