视频知识点
代码(递增排序indexP1101.c)
#include <stdio.h>
void main()
{
int a,b,c,temp;
printf("please input three number:");
//scanf("input a,b,c\n",&a,&b,&c); //原
scanf("%d%d%d",&a,&b,&c);// scanf("%d%d%d",&a,&b,&c);不能为 scanf("%d%d%d\n",&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("a=%d,b=%d,c=%d\n",a,b,c);
}