Presence of bosses can write this program
Thank you very much!
CodePudding user response:
More than 483/10=48 (3, 3 came outMore than 48/10=4, 8, 8 came out
More than 4/10=0, 4, 4 came out
An analogy
CodePudding user response:
///recursive method to replace an integer n with string, for example, enter 483, should be output string 4 August 3 (% 4 c output),//note that n digits are not sure, can be any number of integers,
#include
Int zhuanhuan (int);
Int zhuanhuan (int n)
{
If (n<0)
{printf (" - ");
N=- n;
}
If (n>=0 & amp; & n<=9)
{printf (" % 4 d, n);//we use % 4 d is bad?
}
The else
{zhuanhuan (n/10);
Printf (" % 4 d ", n % 10);
}
return 0;
}
Int main ()
{
int n;
The scanf (" % d ", & amp; N);
Zhuanhuan (n);
return 0;
}
CodePudding user response: