MeehoweCK

Untitled

May 12th, 2021
434
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int najwieksza(int a, int b, int c)
  6. {
  7.     if(a >= b && a >= c)
  8.         return a;
  9.     if(b >= a && b >= c)
  10.         return b;
  11.     return c;
  12. }
  13.  
  14. int main()
  15. {
  16.     cout << "Podaj trzy liczby calkowite: ";
  17.     int a, b, c;
  18.     cin >> a >> b >> c;
  19.     cout << "Najwieksza z wczytanych liczb wynosi " << najwieksza(a, b, c) << endl;
  20.     return 0;
  21. }
RAW Paste Data