fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int max = 0;
  6. for(int i = 0;i < 3;i++){
  7. int x;
  8. cin >> x;
  9. if(max < x){
  10. max = x;
  11. }
  12. }
  13. cout << max << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5288KB
stdin
1 2 3
stdout
3