Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int min (int a, int b, int c, int d)
- {
- int n = 0;
- if ((a < c) && (a < b) && (a < d))
- n = a;
- if ((b < c) && (b < a) && (b < d))
- n = b;
- if ((c < a) && (c < b) && (c < d))
- n = c;
- if ((d < a) && (d < b) && (d < c))
- n = d;
- return n;
- }
- int main ()
- {
- int a, b, c, d;
- cin >> a >> b >> c >> d;
- cout << min(a, b, c, d) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement