L1-010. 比较大小
题目链接:https://www.patest.cn/contests/gplt/L1-010
思路:用三目运算符
注意点:无
1 #include<stdio.h> 2 int main() 3 { 4 int a,b,c; 5 scanf("%d %d %d",&a,&b,&c); 6 a>b?a>c?b>c?printf("%d->%d->%d",c,b,a):printf("%d->%d->%d",b,c,a):printf("%d->%d->%d",b,a,c):b>c?c>a?printf("%d->%d->%d",a,c,b):printf("%d->%d->%d",c,a,b):printf("%d->%d->%d",a,b,c); 7 return 0; 8 }