title: What does it mean mean by "Expected a statement" in C++
body: <p>I have entered an if else code in C++ in visual studio and it shows that a statement is expected at Else and Else if</p>
  
  <p>My code is</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main()
  
  {
  float marks, result;
  cout &lt;&lt; "Enter your Marks:";
  cin &gt;&gt; marks;
  if(marks&gt;=50 &amp;&amp; marks &lt;= 100);
  {
      cout &lt;&lt; "Passed";
  }
  else if (marks &lt; 50 &amp;&amp; marks&gt;=0);
  {
      cout &lt;&lt; "The grade is F ";
  }
  else
  {
      cout &lt;&lt; "Enter marks correctly";
  }
  }
  
  output is
  
  
  Enter your marks:97
  passedenter marks correctly
  </code></pre>
  
  <p>both statements in if and in else are printed out why ??</p>