Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int _max(int x1, int x2)
- {
- if(x1 > x2)
- return x1;
- else
- return x2;
- }
- int main()
- {
- int a, b, c, d;
- cout << "insert the values: ";
- cin >> a >> b >> c >> d;
- int comparison;
- int second_comparison;
- int last_comparison;
- comparison = _max(a, b);
- second_comparison = _max(comparison, c);
- last_comparison = _max(second_comparison, d);
- cout << last_comparison << "\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement