fork download
  1. #include <stdio.h>
  2. int x;
  3.  
  4. int main(void) {
  5. printf ("Enter a whole number: ");
  6. scanf ("%d", &x);
  7. printf ("\n%d", x);
  8. if (x >= 0 && x <= 32)
  9. printf ("\nThe number %d is on the ASCII table and a control character.", x);
  10. else if (x >= 33 && x <= 127)
  11. printf ("\nThe number %d is on the ASCII table and represents %c.", x, x);
  12. else if (x >= 128 && x <= 255)
  13. printf ("\nThe number %d is on the extended ASCII table.", x);
  14. else
  15. printf ("\nThe number %d is not on the ASCII tables.", x);
  16. printf ("\nProgram complete.");
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 9432KB
stdin
14654
stdout
Enter a whole number: 
14654
The number 14654 is not on the ASCII tables.
Program complete.