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 << "Podaj trzy liczby calkowite: ";
- int a, b, c;
- cin >> a >> b >> c;
- cout << "Najwieksza z wczytanych liczb wynosi " << najwieksza(a, b, c) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement