1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 int min(int a, int b, int c, int d) { 6 int res = a; 7 if (res > b) { 8 res = b; 9 } 10 if (res > c) { 11 res = c; 12 } 13 if (res > d) { 14 res = d; 15 } 16 return res; 17 } 18 19 20 int main() { 21 int a, b, c, d; 22 cin >> a >> b >> c >> d; 23 cout << min(a, b, c, d); 24 return 0; 25 } 26 27