title: My submission is not accepted due to Timeout in Hackerrank
body: <p>I got a &quot;Terminated due to timeout error&quot; when I ran my code for some specific testcases only. Even though my code compiled successfully for other testcases. Can someone please help me with this?<br></p>
  <p><strong>Problem Statement</strong><br>
  A number which can be exactly divided by 2 is called an even number.
  Continue is a loop control statement opposite to break statement, instead of terminating the loop, it forces to execute the next iteration of the loop.
  Sohan is curious to know the total even numbers in a given range  but his friend don't like a number .</p>
  <p><strong>Input Format</strong></p>
  <p>First line will contain , number of testcases.
  Then the testcases follow:
  Each testcase contains of a single line containing three numbers   &amp; .</p>
  <p><strong>Constraints</strong><br>
  1&lt;=T&lt;=10^5<br>
  0&lt;=a,b,k&lt;=10^8</p>
  <p><strong>Output Format</strong></p>
  <p>For each testcase, output a single integer, total even count in range  except .</p>
  <p><strong>Sample Input 0</strong></p>
  <p>2<br>
  2 5 4 <br>
  0 8 5</p>
  <p><strong>Sample Output 0</strong></p>
  <p>1<br>
  5</p>
  <p><strong>Explanation 0</strong></p>
  <p>In the 1st test case: 2 is only even except 4 .
  In the 2nd test case: 0,2,4,6,8</p>
  <p>My Answer is:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;math.h&gt;
  #include &lt;stdlib.h&gt;
  int main() 
  {
    int t;
    scanf(&quot;%d&quot;,&amp;t);
    while(t--)
     {
       int a,b,k,i,count=0;
       scanf(&quot;%d %d %d&quot;,&amp;a,&amp;b,&amp;k);
       for(i=a;i&lt;=b;i++)
         {
           if(i%2==0)
             {
               if(i==k)
                 continue;
               else
                 count+=1;
              }    
          }
      printf(&quot;%d\n&quot;,count);
      }
    return 0;
  }
  </code></pre>