3つのエッジが三角形を構成できるかどうかを判断する


#include 
#include 

int main(){
    //             
    float x, y, z;
    //     
    char start;
    //      
    printf("start?(y/n):");
    //         
    scanf("%c", &start);
    while (start == 'y'){
        //    ,         y       
        fflush(stdin);
        //           ,     
        printf("enter the 3 edges of triangle:");
        //        
        scanf("%f, %f, %f", &x, &y, &z);
        //               ,            ,           
        if ((x + y) > z && (x + z) > y && (y + z) > x && abs(x - y) < z && abs(x - z) < y && abs(y - z) < x)
            printf("       !
"); else printf(" !
"); // fflush(stdin); // printf("start?(y/n):"); // scanf("%c", &start); } return 0; }