2.1三位数倒叙输出

/*

  • 2.c
  • Created on: 2018年10月23日
  •  Author: yangchenglong
    

*/
#include<stdio.h>
int main(void)
{
int xxx,a,b,c; //a,百位,b,十位,c,个位
printf(“Enter a three-digit number:”);
setvbuf(stdout,NULL,_IONBF,0);
scanf("%d",&xxx);
a = xxx/100;
b = (xxx%100)/10;
c = (xxx%100)%10;
printf(“The reversal is:%d%d%d”,c,b,a);
return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_43913303/article/details/85327052