0
点赞
收藏
分享

微信扫一扫

问题 G: 零基础学C/C++30—— 判断是否直角三角形

开源分享 2022-04-23 阅读 37
c++

题目描述

输入

输出

样例输入 Copy

样例输出 Copy

#include<bits/stdc++.h>
using namespace std;
int jud(int a,int b,int c);
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	jud(a,b,c);
	return 0;
}

int jud(int a,int b,int c)
{
	if( a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
	cout<<"yes";
	else
	cout<<"no";
	return 0;
}
举报

相关推荐

0 条评论