fork download
  1. #include <iostream>
  2. using namespace std;
  3. //Es 8. Scrivere un programma che legge 5 numeri da tastiera e ne restituisce il minimo
  4. int x;
  5. int minimo;
  6. int main() {
  7. cin>>minimo;
  8. for (int i=2; i<=5; i++)
  9. {
  10. cin>>x;
  11. if (x < minimo) {minimo=x;}
  12. }
  13.  
  14. cout<<" min = "<<minimo;
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5284KB
stdin
123131131 412431231231231313 124124312431231223123 52523424244234 2424242342434320000000000000000000000000000000000000000000000000000000000000000
stdout
 min = 123131131