#include "stdio.h" main() { int a,b,c,temp; printf("输入三个整数:\n"); scanf("%d%d%d",&a,&b,&c); if (a>=b) {temp=a;a=b;b=temp;} if (a>=c) {temp=a;a=c;c=temp;} if (b>=c) {temp=b;b=c;c=temp;} printf("Min=%d Mid=%d Max=%d\n",a,b,c); }
#include "stdio.h" main() { int a,b,c,temp; printf("输入三个整数:\n"); scanf("%d%d%d",&a,&b,&c); if (a>=b) {temp=a;a=b;b=temp;} if (a>=c) {temp=a;a=c;c=temp;} if (b>=c) {temp=b;b=c;c=temp;} printf("Min=%d Mid=%d Max=%d\n",a,b,c); }
转载于:https://www.cnblogs.com/rechen/p/5072065.html