fork download
  1. // Online C++ compiler to run C++ program online
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a[3];
  7. cin >> a[0] >> a[1] >> a[2];
  8. int min;
  9. for (int i = 0; i < 3; ++i) {
  10. if (i == 0 || min > a[i]) {
  11. min = a[i];
  12. }
  13. }
  14. cout << min;
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5280KB
stdin
3 4 -2
stdout
-2