Last active
March 23, 2022 10:04
-
-
Save mbledkowski/8cb7702519c0fb050ef4eb7468ca0810 to your computer and use it in GitHub Desktop.
my siorka's homework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
int a; | |
cout<<"Podaj a: "; | |
cin>>a; | |
int b; | |
cout<<"Podaj b: "; | |
cin>>b; | |
int c; | |
cout<<"Podaj c: "; | |
cin>>c; | |
if(a<=0 || b<=0 || c<=0) { | |
cout<<"Brak rozwiazania"; | |
} else if(pow(c,2)==pow(a,2)+pow(b,2)) { | |
cout<<"Trojkat jest prostokatny"; | |
} else { | |
cout<<"Trojkat nie jest prostokatny"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment