#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
int a, b, c, y = 3;
scanf("%d", &a);
a = pow(a, 2);
scanf("%d", &b);
b = pow(b, 2);
scanf("%d", &c);
c = pow(c, 2);
while(y > 2){
if (a == b + c ){
y = 1; break;
}
if (b == c + a ){
if (c == a + b) {
if (a != b + c ){
y = 2; break;
if (b != c + a ){
if (c != a + b ){
printf("\nPryamougolniy : ", y);
switch (y) {
case 1: printf("Yes"); break;
case 2: printf("No"); break;
return 0;
Объяснение:
Dev C++
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
int a, b, c, y = 3;
scanf("%d", &a);
a = pow(a, 2);
scanf("%d", &b);
b = pow(b, 2);
scanf("%d", &c);
c = pow(c, 2);
while(y > 2){
if (a == b + c ){
y = 1; break;
}
if (b == c + a ){
y = 1; break;
}
if (c == a + b) {
y = 1; break;
}
if (a != b + c ){
y = 2; break;
}
if (b != c + a ){
y = 2; break;
}
if (c != a + b ){
y = 2; break;
}
}
printf("\nPryamougolniy : ", y);
switch (y) {
case 1: printf("Yes"); break;
case 2: printf("No"); break;
}
return 0;
}
Объяснение:
Dev C++