#include #include /********************************* * Program that converts an ASCII * character to it's underlying * numerical value (assuming it's * a digit character). ********************************/ int main() { //Create a variable to store input unsigned char c; //Read input and cast to an unsigned char c = (unsigned char) getchar(); //Create integer to store digit value unsigned int n; //Complete calculation to generate digit n = c - '0'; //Print character and resulting digit printf("%d %d\n", c, n); exit(5); return 0; }