Output from a for loop is incorrect due to wrong calculations.

Printable View