The problem is octal turn decimal
Int main (void) {
C, unsigned int num=0, ct=0;
Printf (" both Please input a positive octal integer and end with pressing the Enter: \ n ");
//Read the octal string, at most 10 characters.
While ((c=getchar ())!='\ n' & amp; & . ) {
...
}
//If the input is not valid, the output of the error message.
if (c ! )='\ n' {
Printf (" ERROR: the input should be an octal string containing 0 to 7, with length less than 11! \n");
} else {//the Output, the conversion table.
Printf (" I \ t8 ^ I \ tdigit \ tproduct \ n ");
.
//the Output of the decimal value
Printf (" a Decimal value: % d \ n ", num);
}
return 0;
}