Skip to main content

6.6) Understanding Loops


Loops are a way of doing some process over and over again. Say, for instance, I wanted to print the numbers 1 to 100 to the screen. Without loops the program would have to be written with:

print *, ‘1’
print *, ‘2’
...
print *, ‘100’

This would be very tedious.