SPECIFYING THE NUMBER OF DECIMAL PLACES FOR DISPLAYING REALS
The following change to the above program will print out the circumference using a fieldwidth of ten, and two decimal places.


       writeln('The circles circumference is ',Circumference:10:2);

PROGRAM EIGHT
Write a program which inputs the ordinary time and overtime worked, calculating the gross pay. The rate is 4.20 per hour, and overtime is time and a half.

Click here for answer


Copyright B Brown/P Henry/CIT, 1988-1997. All rights reserved.