fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. int a, b ,c, d, e,f,g,x,h;
  6. a=1;
  7. b=2;
  8. c=3;
  9.  
  10. x= 0;
  11.  
  12.  
  13. d=a+b*c;
  14. e=a*(b+c);
  15. f=a*b*c;
  16. g=(a+b)*c;
  17. h=a+b+c;
  18.  
  19.  
  20. if((d>x) && (d>=e) &&(d>=f) &&(d>=g)&& ( d>=h))
  21. cout<<d;
  22. else if((e>x) && (e>=d) &&(e>=f) &&(e>=g) && ( e>=h))
  23. cout<<e;
  24. else if((f>x) && (f>=d) &&(f>=e) &&(f>=g) && ( f>=h))
  25. cout<<f;
  26. else if((g>x) && (g>=d) &&(g>=f) &&(g>=e) && ( g>=h))
  27. cout<<g;
  28. else if((h>x) && (h>=d) &&(h>=f) &&(h>=e)&& (h>=g))
  29. cout<<h;
  30. else
  31.  
  32.  
  33. return 0;
  34.  
  35. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
9