Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

The Type int [8/14]

A value of type int can be aligned on printout by using the getter function .pad.

The getter function .pad prepends the integer with blanks on the left. This causes the printout of the integer to be aligned to the right.

The argument of the getter function .pad specifies a minimum number of places that the integer occupies.

Loading...