Simple for loop in C
#include <stdio.h> int main(void) { int i; /*loop is executed 10 times*/ for (i=1; i<=10; ++i) /* i starts at 1 and goes up to 10*/ { printf ("number = %i\n", i); } return 0; }
#include <stdio.h> int main(void) { int i; /*loop is executed 10 times*/ for (i=1; i<=10; ++i) /* i starts at 1 and goes up to 10*/ { printf ("number = %i\n", i); } return 0; }