Advertisement
ZhilinskiyG

Probnik

Mar 19th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. using namespace std;
  4. int max(int a, int b)
  5. {
  6.     if (a > b) {
  7.         return a;
  8.     }
  9.     else {
  10.         return b;
  11.     }
  12.     int main()
  13.     {
  14.         int a;
  15.         int b;
  16.         int c;
  17.         int d;
  18.         cin >> a;
  19.         cin >> b;
  20.         cin >> c;
  21.         cin >> d;
  22.         cout << max(a, max(b, max(c, d)));
  23.     }
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement