Pengulangan dengan For Loop



Kerangka for:
for (/* start */; /* condition */ ; /* counter */)
{
    /* statement */
}

Contoh source code:
#include <stdio.h>

int main()
{
   for (int i = 0; i < 5; i++)
   {
      printf("Hello world %d\n", i);
   }

   return 0;
}

atau

#include <stdio.h>

int main()
{
   int i;

   for (i = 0; i < 5; i++)
   {
      printf("Hello world %d\n", i);
   }

   return 0;
}

Post a Comment