Quite often, it is useful to nest one DO loop inside of another. For example, consider the problem of approximating and displaying the square roots of the integers between 1 and 10. Take a look at ``sroot2.f'' (or view it directly). We are making use of the same SROOT function from the last example, but with a new main program.
In what sense does this program exhibit a nested loop?
Compile and run the program. You'll notice that it doesn't work. Try to figure out the problem before you look at the answer below.
Now that you know what the problem is, how can you fix it?
Hamlet Project