Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C for loop

//the syntax of the for loop statement is: for(init;condition;inc/dec) {statement(s)}
//init=initialization
//inc=increment|incrementation formula is i++ or ++i
//dec=decrement|decrementation formula is i-- or --i
#include<stdio.h>
main()
{
	int n;
	for(n=1;n<=4;n++)
	{
		printf("%d, ",n);
	}
	printf("%d.",n);
}
Source by leetcode.com #
 
PREVIOUS NEXT
Tagged: #C #loop
ADD COMMENT
Topic
Name
6+5 =