how to do a loop ic C code example
Example 1: c make loop
// Print numbers from 1 to 5
#include <stdio.h>
int main()
{
int i = 1;
while (i <= 5)
{
printf("%d\n", i);
++i;
}
return 0;
}
Example 2: whiel loop in C
while (testExpression)
{
// statements inside the body of the loop
}