Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int MAX (int a, int b, int c) {
- if (a>b && a>c) {return a;}
- else if (b>a && b>c) {return b;}
- else {return c;}
- }
- int main()
- {
- cout<<MAX(2,5,1)<<endl;
- cout<<MAX(13,12,15)<<endl;
- cout<<MAX(14,12,11)<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement