title: How to change this statement in switch
body: <pre><code>if (year == 9 || year == 10) {
      dividend = investment * 7.5;
  }
  else if (year == 7 || year == 8) {
      dividend = investment * 6.5;
  }
  else if (year == 5 || year == 6){
      dividend = investment * 5.5;
  }
  else  {
      dividend = investment * 3.5;
  }
  
  cout &lt;&lt; "The dividend is RM " &lt;&lt; dividend &lt;&lt; endl;
  </code></pre>