#include<stdio.h> \\判定一个三角形是否为直角三角形
#include<math.h>
int main()
{
int a = 0;
int b = 0;
int c = 0;
printf("please enter the three length of sides\n");
scanf_s("%d", &a);
scanf_s("%d", &c);
scanf_s("%d", &b);
if ((a * a) + (b * b) == (c * c))
return 1;
else if ((a * a) + (c * c) == (b * b))
return 1;
else if ((b * b) + (c * c) == (a * a))
return 1;
else
return 0;
}
2021/9/27练手训练
最新推荐文章于 2024-07-13 18:32:53 发布