Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "src\maxim.cpp"
- #define Log(x) cout << x << endl;
- using namespace std;
- void maximum(int a, int b, int c, int d){
- int maxim;
- if( a > b && a > c && a > d )
- maxim = a;
- else if ( b > a && b > c && b > d)
- maxim = b;
- else if (c > a && c > b && c > d)
- maxim = c;
- else if (d > a && d > b && d > c)
- maxim = d;
- cout << maxim;
- }
- int main()
- {
- int a, b, c, d;
- Log(" a: ");
- cin >> a;
- Log(" b: ");
- cin >> b;
- Log(" c: ");
- cin >> c;
- Log(" d: ");
- cin >> d;
- maximum(a, b, c, d);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement