What will the following program print in for loop? Add more controlling variable. - C Statement

C examples for Statement:for

Description

What will the following program print in for loop? Add more controlling variable.

Demo Code

#include <stdio.h> 
int main(void) 
{ 
     int n, m; /*w w  w  . j  a v  a2s  .  c o  m*/
 
     for (n = 2, m = 6; n < m; n *= 2, m+= 2) 
          printf("%d %d\n", n, m); 
     n = 30; 

}

Result


Related Tutorials