Monday, April 6, 2020

CONSTRU1.P

[Table of Contents]
Disk Image

CONSTRU1.p is from Entering  Formulas section of the Kyan Pascal 2.x manual/tutorial. It shows how to prompt for information from the user, how to receive information from the user, how to calculate results using formulas, and finally, show the results.

What's on the disk?


The disk image includes the various Atari DOS 2.5 files, Kyan Pascal Include files (none of which are used in this program), Kyan Pascal Run-time library, and ...

CONSTRU1.P - Source code file
P.OUT - Kyan Pascal intermediate file
CONSTRU1 - Executable file

Source Code


(* CONSTRU1.P *)
(* Kyan Pascal 2.04 / Atari 8-bit *)

Program Constru1(Input, Output);
(* Dollar units are thousands *)

Const
   Material = 325.00;

Var
   Hours, Rate, Labor, Total : Real;

Begin
   Write(Chr(125)); (* Clear screen *)
   Writeln('Enter hours worked, and press RETURN');
   Writeln('Then enter Rate Of Pay and press RETURN');
   Readln(Hours);
   Readln(Rate);
   Labor := Hours * Rate;
   Total := Labor + Material;
   Writeln('Labor=$', Labor:8:2, ' Total = $', Total:8:2)

End.

Sample Run




No comments:

Post a Comment