The following program contains syntax errors.
- Select the code and copy it into a
Java project.
- Complete the program, correct any errors, and
compile the code. Execute the program.
- Add comments to indicate what is
happening at important stages in the program.
- How might you optimize this program? Can the number of variables be reduced?
|