Advertisement
SergeyPGUTI

6.1.1

Oct 24th, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int min(int a,int b,int c,int d)
  6. {
  7.     if (a<b) b=a;
  8.     if (b<c) c=b;
  9.     if (c<d) d=c;
  10.     return d;
  11. }
  12. int main()
  13. {
  14.     int a,b,c,d;
  15.     cin>>a>>b>>c>>d;
  16.     cout<<min(a,b,c,d);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement