Uses a for loop to generate the "2, 4, 6, 8" part of the chant. - C Statement

C examples for Statement:for

Description

Uses a for loop to generate the "2, 4, 6, 8" part of the chant.

Demo Code

#include <stdio.h>
int main()/*from  w w  w  . j a va2s.  c o  m*/
{
   int i;
   for(i=2;i<10;i=i+2)
      printf("%d ",i);
   printf("who do we appreciate? GNU!\n");
   return(0);
}

Result


Related Tutorials