Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int x;
- int y;
- int z;
- int LICZBY_PITAGOREJSKIE(int a, int b, int c){
- if(a*a+b*b==c*c){
- return 1;
- }
- else{
- return 0;
- }
- }
- int main()
- {
- cout << "Podaj 3 liczby calkowite" << endl;
- cin>>x;
- cin>>y;
- cin>>z;
- if(LICZBY_PITAGOREJSKIE(x,y,z)==1){
- cout<<"Podane liczby sa liczbami pitagorejskimi";
- }
- else{
- cout<<"Podane liczby nie sa liczbami pitagorejskimi";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement