fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // string s;
  6. // getline(cin , s);
  7. // cout<<s;
  8.  
  9. int a ,b, c ;
  10. cin>>a >>b >>c;
  11. // if(a%7==0){
  12. // cout<<a<<" thala for a reason";
  13. // }
  14. // else{
  15. // cout<<a<<" thala for no reason";
  16. // }
  17.  
  18. // (a==7)?cout<<"thala":cout<<"no thala";
  19.  
  20. // if(a==1){
  21. // cout<<"Monday";
  22. // }
  23. // else if(a==2){
  24. // cout<<"tuesday";
  25. // }
  26. // else if(a==3){
  27. // cout<<"wednesday";
  28. // }
  29. // else if(a==4){
  30. // cout<<"Thrusday";
  31. // }
  32. // else if(a==5){
  33. // cout<<"friday";
  34. // }
  35. // else if(a==6){
  36. // cout<<"saturady";
  37. // }
  38. // else if(a==7){
  39. // cout<<"sunday";
  40. // }
  41. // else{
  42. // cout<<"write number from 1 to 7";
  43. // }
  44.  
  45. // if(a==10){
  46. // if(b==15){
  47. // cout<<"hello beta";
  48. // }
  49. // else{
  50. // cout<<"namaste beta";
  51. // }
  52. // }
  53. // else{
  54. // if(b==16){
  55. // cout<<"wow beta";
  56. // }
  57. // else{
  58. // cout<<"kya baat beta";
  59. // }
  60. // }
  61.  
  62. if(a>b){
  63. if(a>c) cout<<"a is greatest";
  64. else if (a<c) cout<<"c is greatest";
  65. }
  66. else if(a<b){
  67. if(b>c) cout<<"b is greatest";
  68. else if (b<c) cout<<"c is greatest";
  69.  
  70. }
  71. else if (a==b) {
  72. if(b>c) cout<<" a and b is greatest";
  73. else if (b<c) cout<<"c is greatest";
  74. else cout<<"all are equal";
  75.  
  76. }
  77.  
  78.  
  79.  
  80. return 0;
  81. }
Success #stdin #stdout 0.01s 5312KB
stdin
1 3 2
stdout
b is greatest