Simple for-loop countdown timer in C
<p>This is what the code should do:</p>

<blockquote>
  <p>“Lift off in T minus<br> 5<br> 4<br> 3<br> 2<br> 1<br> Blast-off!”</p>
</blockquote>

<p>When I run it, it just keeps printing ''Sum = 5'' forever.</p>

<p>Code:</p>

<pre><code>int main(void) {

int sum = 5;  
int i;     

printf("Lift off in T minus\n");

for (i = 0; i &lt; 5; i=i+i) {
    sum = sum - i;  
    printf("sum = %d\n",sum);  
} 

printf("Blast-off",sum);  

return 0;
</code></pre>