#include <stdio.h> int main() { int a,b,c,t; //定义和输入 scanf("%d%d%d",&a,&b,&c); if(a>b) //好像是冒泡排序的步骤,感觉是,不确定 { t=a; a=b; b=t; } if(b>c) { t=b; b=c; c=t; } if(a>b) { t=a; a=b; b=t; } printf("%d,%d,%d",a,b,c); //输出 return 0; }
有错的地方指正
#include <stdio.h> int main() { int a,b,c,t; //定义和输入 scanf("%d%d%d",&a,&b,&c); if(a>b) //好像是冒泡排序的步骤,感觉是,不确定 { t=a; a=b; b=t; } if(b>c) { t=b; b=c; c=t; } if(a>b) { t=a; a=b; b=t; } printf("%d,%d,%d",a,b,c); //输出 return 0; }
有错的地方指正
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。