For Loop
'for' is a looping attribute which is used to perform a set of instructions multiple times in a given range.
Syntax of 'range':
range : (variable = start_point, end_point, steps)Examples:
Correct Syntax:
range : (Int i = 0, 10)
or
range : (i = 0 , 10)
------------
Wrong Syntax:
range : Int i = 0, 10
or
range : (50)Sample Code to print 0 to 5 numbers.
OUTPUT :
Sample Code to print even number between 0 and 15.
OUTPUT :
Last updated