title: Error on expected a statement on if and else statement
body: <p>In my comparison problem, I used an if and else statement, so I am getting an error on it.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
  
      double lgt, hgt, lgt1, hgt1, x, y;
  
      cout &lt;&lt; "enter the length of retangle 1= ";
      cin &gt;&gt; lgt;
      cout &lt;&lt; "Enter the height of rectangle 1= ";
      cin &gt;&gt; hgt;
      cout &lt;&lt; "enter the length of rectangle 2= ";
      cin &gt;&gt; lgt1;
      cout &lt;&lt; "enter the height of rectangle 2= ";
      cin &gt;&gt; hgt1;
  
      x = lgt*hgt;
      y = lgt1*hgt1;
  
      if (x == y); {
          cout &lt;&lt; "both is same" &lt;&lt; endl;
      }   
      else if (x &gt; y);{
          cout &lt;&lt; "rectangle 1 is bigger" &lt;&lt; endl;
      }
      else {
          cout &lt;&lt; "rectangle 2 is bigger" &lt;&lt; endl;
      }
  
  
  
      return 0;
  }
  </code></pre>
  
  <p>What is causing this error to happen?</p>