Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int najwieksza(int a, int b, int c)
- {
- if(a >= b && a >= c)
- return a;
- if(b >= a && b >= c)
- return b;
- return c;
- }
- int main()
- {
- cout << "Wpisz trzy liczby, ktore chcesz porownac: ";
- int x, y, z;
- cin >> x >> y >> z;
- cout << "Najwieksza z wpisanych liczb to " << najwieksza(x,y,z) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement