Advertisement
PiotrSzewczyk

Zad 15

Mar 31st, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int liczby_pitagorejskie (int a, int b, int c)
  6.     {
  7.         if ((a*a)+(b*b)==c*c){
  8.             return 1;}
  9.         else {
  10.             return 0;
  11.         }
  12.     }
  13.  
  14.  
  15. int main ()
  16. {
  17.     int a, b, c;
  18.     cout<<"Podaj 3 liczby"<<endl;
  19.     cin>>a>>b>>c;
  20.     cout<<"Funkcja zwraca wartosc "<<liczby_pitagorejskie(a,b,c)<<endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement