22智能在线
新记
输入3个数a,b,c,按大小顺序输出。
如题所述
举报该文章
相关建议 2017-07-08
#include
void main()
{
int a,b,c;
printf("请输入三个整数,以空格分隔:");
scanf("%d%d%d",&a,&b,&c);
int temp;
if(a>b)
{
temp = a;
a = b;
b = temp;
}
if (b > c)
{
temp = b;
b = c;
c = temp;
}
printf("结果为:%d,%d,%d\n",c,b,a);
}
温馨提示:内容为网友见解,仅供参考
当前网址:
https://22.t2y.org/zz/6cxitsisss60062fs2.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
C语言 有3个数a,b,c,要求按大小顺序把它们输出。
输入3个数a,b,c,按大小顺序输出。 利用指针方法。
输入3个数a,b,c,按大小顺序输出。
输入3个数a,b,c,按大小顺序输出。 C++编程
用java.随机输入3个数a,b,c,按大小顺序输出。
c语言,三个数a,b,c按大小顺序输出,求流程图
输入3个数a、b、c,要求按从小到大的顺序输出 ,用C语言写
有3个数a,b,c,要求按大小顺序把它们输出