print 0 1 2 3 4 in c code example
Example 1: print 0 1 2 3 4 in c
//prints 0 1 2 3 4 , i<..num.. of loop iterations.
for (i = 0; i < 5; ++i)
{
printf("%d", i);
}
Example 2: print 0 1 2 3 4 in c while loop
int k=0;
while (k <= 5)
{
printf("%d", k);
k = k + 1;
}