Effective Teaching Of Programming Concepts Using Low Resolution (Character) Graphics

Tamisra Sanyal · 2020

Highlighting difference between integer and floating point arithmetic I then introduce a fourth version of the program which is identical to the third version except that the named constants LPI and CPI are declared as integer numbers rather than floating point numbers.For standard line printers LPI = 6 and CPI = 10 so it seems reasonable to declare these as integer type rather than a floating point type.This causes the translation from (column, row)Page 11.518.4positions to (x, y) coordinates to use integer division and as a result the circle morphs into a collection of rectangles or almost disappears (depending on the value of the radius chosen).See a sample output below.

Read the paper · More papers on PaperTik