c语言编程练习题:7-73 比较大小
作者:yunjinqi   类别:    日期:2023-05-30 15:46:51    阅读:131 次   消耗积分:0 分    

image.png

#include <stdio.h>
int main(){
    int a,b,c;
    int temp;
    if (scanf("%d",&a)!=EOF && scanf("%d",&b)!=EOF && scanf("%d",&c)!=EOF){
        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("%d->%d->%d",a,b,c);

    }else{
        printf("These sides do not correspond to a valid triangle");
    }
    return 0;
}


版权所有,转载本站文章请注明出处:云子量化, http://www.woniunote.com/article/198
上一篇:c语言编程练习题:7-72 三天打鱼两天晒网
下一篇:c语言编程练习题:7-74 三角形判断