FOR -> is a keyword that is used to perform iteration with a digit numeric selection, in the form of integer or fractional.
syntax
for(value_first; limit; changes )
{//statement to be run}
in the code that appears to be filled with the original values and create a variable filled with the beginning of the process. To limit the content of the iteration limit, and the change is a value that changes the value of var to be the limit. Before running the program reached the limit statement in the for block.
Example For IncrementDescription
The first value of i = 0, and then checked whether i <4 i =" 1"> 4 or i value false.
Example For DecrementDescription
almost the same as for increment, the value i only just started i = 3 or change the value of the decrement decrease.
Description of the road program in detail
Example of printing the program genap
Example of printing the program ganjil
0 comments:
Post a Comment