Answer:
The function in C is as follows:
bool checkPythagoras(int a, int b, int c ){
bool chk = false;
if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a){
chk = true;
}
return chk;
}
Step-by-step explanation:
This defines the function. It receives three integer parameters a, b and c
bool checkPythagoras(int a, int b, int c ){
This initializes the return value to false
bool chk = false;
This checks if the three integers are Pythagorean Triple
if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a){
If yes, the return value is updated to true
chk = true;
}
This returns true or false
return chk;
}