帮忙看一个简单的C语言程序(求一个三角形是不是直角三角形,并求面积)

#include <stdio.h> #include<Windows.h> void main() { int a,b,c,s; printf("please enter three integers:"); scanf("%d%d%d",&a,&b,&c); if (a*a+b*b=c*c) s=a*b/2; printf("%d",s); else if (b*b+c*c=a*a) s=b*c/2; printf("%d",s); else if (a*a+c*c=b*b) s=a*c/2; printf("%d",s); else printf("sorry,it cannot be a triangle."); Sleep(2000); }

if后的语句没有用大括号括起来。

希望采纳
温馨提示:答案为网友推荐,仅供参考
相似回答