fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int a,b,c;
  6. void init(){
  7. cin>>a;
  8. cin>>b;
  9. cin>>c;
  10.  
  11. }
  12. void solve(){
  13. int max=a;
  14. if(b>max){
  15. max=b;
  16. if(c>max){
  17. max=c;
  18. cout<<max;}}
  19. else cout<<max;
  20.  
  21. }
  22.  
  23. int main() {
  24. init();
  25. solve();
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 5320KB
stdin
4
2
3
stdout
4