fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int numero;
  6. int max=0;
  7. do {
  8. cin>> numero;
  9. if (numero> max)
  10. max= numero;
  11.  
  12. } while (numero!=0);
  13. cout<< max;
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0s 5284KB
stdin
7
4
1
8
5
2
9
0
stdout
9