Answer
The problem is that the program is supposed to compute the quotient of
the two input numbers, but it computes the sum instead. The program
is perfectly OK as far as Fortran is concerned, since it contains no
syntactic errors. And it is perfectly OK as far as the computer is
concerned---there is no longer a possibility of division by zero.
Nevertheless, the program is completely wrong because it doesn't do
what it is supposed to do!
Return to lesson.
Hamlet Project
hamlet@cs.utah.edu