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