C examples for Statement:for
Use int to control for loop
#include <stdio.h> int main()/*from www .j a v a2s .c o m*/ { int i; for(i=0 ; i<5 ; i=i+1) { printf("Ouch! Please, stop!\n"); } for(i=1 ; i<=10 ; i=i+1) printf("%d\t",i); return(0); }