/*--------------------------------------------------------------------*/ /* uppercase.c */ /* Author: Bob Dondero */ /*--------------------------------------------------------------------*/ #include enum {LOWER_TO_UPPER = -32}; static char cChar; int main(void) /* Read a letter from stdin, and write its uppercase equivalent to stdout. Return 0. */ { scanf("%c", &cChar); /* Could call getchar() */ cChar += LOWER_TO_UPPER; /* Should call toupper() */ printf("%c\n", (int)cChar); /* Could call putchar() */ return 0; }