楼主,我也是新学的,只会简单办法,运行结果请见下面截图,有问题一起讨论哦,菜鸟鸭梨大:
#include <stdio.h>
int main (void)
{
int number, remainder;
printf ("Pls. enter a number:\n");
scanf ("%i", &number);
do
{
remainder = number % 10;
printf ("%i", remainder);
number = number / 10;
}
while ( number != 0 );
printf ("\n");
return 0;
}
[ 本帖最后由 bctea 于 2012-3-15 05:28 编辑 ]
#include <stdio.h>
int main (void)
{
int number, remainder;
printf ("Pls. enter a number:\n");
scanf ("%i", &number);
do
{
remainder = number % 10;
printf ("%i", remainder);
number = number / 10;
}
while ( number != 0 );
printf ("\n");
return 0;
}
[ 本帖最后由 bctea 于 2012-3-15 05:28 编辑 ]