title: Can't I use many ifelse in else?
body: <p>This code is a complex if.
  I write this code because I want to use the flow control to decide whether the user can eat the cake or not.
  The variables a, b, c, d are some indexes that the user will put in.
  In this place, I have already set these indexes.
  Based on the indexes, the nested if will give some responses. </p>
  
  <pre><code>a &lt;- 1 ; b &lt;-  2 ; c &lt;- 3 ; d &lt;- 3
  
  index &lt;- sum(a, b, c, d)
  
  if(index &gt; 11){print("enjoy the cake right now!")
  }else{
    if(b == 1 | c == 1){"You don't have the right to eat cake."
    }else{
      ifelse(b == 3, "go to ATM and take money right now", 
             ifelse(b == 2, "use the budget of tomorrow first",print("") )
      )
      print("bb")
      ifelse(c == 4, "run to the cake store and burn some calores ", 
             ifelse(c == 3,"ride youbike to the cake store", 
                    ifelse(c == 2, "ride youbike to the cake store",print(""))))
      print("aa")
      }
          }
  </code></pre>
  
  <p>My expectation is:</p>
  
  <pre><code>[1] "use the budget of tomorrow first"
  [1] "bb"
  [1] "ride youbike to the cake store"
  [1] "aa"
  </code></pre>
  
  <p>But the result is:</p>
  
  <pre><code>[1] "bb"
  [1] "aa"
  </code></pre>
  
  <p>Why the R program didn't run the "ifelse" part and just printed "bb", "aa"?
  Is this because the "else" can't include "ifelse"?</p>