c program for loop example
Example 1: for loop c
for(int i = 0; i<n ;i++) //i is the number of iterations that occur
{ //n is the total number of iterations
//code here
}
Example 2: 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;
}