Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
9 user(s) are online (7 user(s) are browsing encyclopedia)

Members: 0
Guests: 9

more...
partner

For loop

In most Imperative programming computer programming languages, a for loop is a control structure which allows code to be execution (computers) iteratively. For loops, unlike while loops, are typically used when the number of iterations is known before entering the loop.

= Examples =

These for loops will calculate the factorial of the number five, 5!, by iterating through all the numbers 1 through 5 and keeping a running product:

== QBasic or Visual Basic ==

Dim factorial As Long : factorial = 1 Dim counter As Integer For counter = 1 To 5 factorial = factorial * counter Next Print factorial

== C programming language or C plus plus ==

unsigned long factorial = 1; for (unsigned int counter = 1; counter