ascii.c (410B)
1 /* Exercise 8.25 */ 2 3 #include <stdio.h> 4 5 int main(void) 6 { 7 int code; 8 9 /* Exercise 8.25: first step. 10 printf("Give me the ASCII code: "); 11 scanf("%d", &code); 12 13 printf("The character is: %c\n", code); 14 */ 15 16 /* Exercise 8.25: final step. */ 17 printf("ASCII code\tASCII character\n"); 18 for(code = 0; code <= 255; code++) { 19 printf("%.3d\t%c\n", code, code); 20 } 21 22 return 0; 23 } /* E0F main */ 24