Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int liczba1,liczba2,liczba3;
- int MAX(int a, int b, int c)
- {
- if((a>b) && (a>c))
- {
- return a;
- }
- if((b>a) && (b>c))
- {
- return b;
- }
- if((c>a) && (c>b))
- {
- return c;
- }
- }
- int main()
- {
- cout << "Podaj trzy liczby naturalne: ";
- cin >> liczba1 >> liczba2 >> liczba3;
- cout << "Najwieksza liczba to: " << MAX(liczba1,liczba2,liczba3);
- return 0;
- }
Add Comment
Please, Sign In to add comment