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)
- {
- int d=a;
- if (d<b)
- {
- d=b;
- if (d<c)
- {
- d=c;
- }
- }
- else if (d<c)
- {
- d=c;
- }
- return d;
- }
- int main()
- {
- cout<<MAX(1,2,3)<<endl;
- cout<<MAX(5,298,24)<<endl;
- cout<<MAX(1123,423,64)<<endl;
- cout<<MAX(3,3,2)<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement