#include <stdio.h>
int isTrianglr(double a,double b,double c);
int main()
{
double x;
double y;
double z;
int q;
printf("输入三条边");
scanf("%f %f %f",&x,&y,&z);
q=isTrianglr(x,y,z);
if(q)
printf("能组成三角形");
else
printf("不能组成三角形");
}
int isTrianglr(double a,double b,double c)
{
if((a+b)>c && (a+c)>b && (b+c)>a)
return 1;
else
return 0;
}
guozhchun
相关分类