#include<stdio.h>
int main()
{
int A,B,C;
scanf("%d,%d,%d",&A,&B,&C);
if(A>B)
{
if(B>C){
printf("最大值是%d,最小值是%d",A,C);
}
else{//(B<=C)
printf("最大值是%d,最小值是%d",A,B);
}
}
else if(A<B){
if(A>C){
printf("最大值是%d,最小值是%d",B,C);
}
else{//(A<=C)
printf("最大值是%d,最小值是%d",B,A);
}
}
else{//(A=B)
if(B>C){
printf("最大值是%d,最小值是%d",A,C);
}
else if(B<C){
printf("最大值是%d,最小值是%d",C,A);
}
else{//(B=C)
printf("三个数相等!");
}
}
return 0;
}
输入:10,5,7
(用英文逗号隔开每个数字)