Advertisement
WiktoriaRatajczyk

Zadanie 13

Mar 31st, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int MAX (int a, int b, int c) {
  6. if (a>b && a>c) {return a;}
  7. else if (b>a && b>c) {return b;}
  8. else {return c;}
  9. }
  10.  
  11. int main()
  12. {
  13.     cout<<MAX(2,5,1)<<endl;
  14.     cout<<MAX(13,12,15)<<endl;
  15.     cout<<MAX(14,12,11)<<endl;
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement