title: What is the value of the variable result after the following code is executed?
body: <pre><code>int count = 0, result = 0;
  while(count &lt;= 10)
  {
      if(count % 2 ==0)
      {
          result = result + count;
      }
      else
      {
          result = 0;
      }
      count = count + 2;
  }
  System.out.println("Result: " + result); 
  </code></pre>
  
  <p>Can someone explain why the answer is 30?</p>