Advertisement
MeehoweCK

Untitled

Oct 21st, 2020
1,982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. // napisz funkcję, która zwraca wartość większej z dwóch podanych liczb:
  6.  
  7. int wieksza(int a, int b)
  8. {
  9.     if(a >= b)
  10.         return a;
  11.     return b;
  12. }
  13.  
  14. int main()
  15. {
  16.     int a, b;
  17.     cin >> a >> b;
  18.     cout << wieksza(a,b) << endl;
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement