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