Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
Programming

The for loop

 

Control Structures

The for loop

We can run over a sequence of values using a for loop.

See also: Bricks tutorial

1. [ Java ] 0 1 2 3 4 5 6 7 8 9


Big

The for loop can be used to run through a sequence of integers.

2. [ Java ] 10 9.5 9 8.5 8


Big

We don't have to use integers.

But it's best to.