1for(int i = 0; i<n ;i++) //i is the number of iterations that occur
2{ //n is the total number of iterations
3 //code here
4}
1int compteur;
2
3for (compteur = 0 ; compteur < 10 ; compteur++)
4{
5 printf("Salut les Zeros !\n");
6}
7
1int i;
2for (i = 0; i < n; ++i) { // n is the number of iterations
3 // Code here
4}
1//Sample for loop in c
2//Prints the contents of the array in new lines
3#include <stdio.h>
4int main(){
5 int a, b[5] = {2, 4, 5, 7, 9};
6 for (a = 0; a<5; a++){
7 printf("%d\n", b[a]);
8 }
9
10
11}