C语言判断输入的数是三位数并且将其倒序输出(c语言输入三个数从小到大排序输出)

C语言判断输入的数是三位数并且将其倒序输出(c语言输入三个数从小到大排序输出)

首页维修大全综合更新时间:2025-02-02 20:39:59

C语言判断输入的数是三位数并且将其倒序输出

#include<stdio.h>int main(){ int a; printf("请输入:")

; scanf("%d",&a)

; if(a/100>0&&a/1000==0){ a=a/100+a/10%10*10+a%10*100; printf("是三位数,倒序为%d ",a); } else printf("不是三位数 "); return 0;}

大家还看了
也许喜欢
更多栏目

© 2021 3dmxku.com,All Rights Reserved.