I need HELP with the CODE of my program.

Posted by John Heathor on April 01, 2003

I have tried to write a procedure getAmounts( money : real; var dollars, cents : integer ); which takes a real money value and passes back the whole number of dollars and the whole number of cents.

I need Help for structure of the program

program ;

{$APPTYPE CONSOLE}

uses SysUtils;

procedure getAmounts( money : real; var dollars, cents : integer );
const
Stop = -1;
var
dollars, cents : integer;

begin
getAmounts( -123.45, dollars, cents );
writeln( $, dollars, and , cents, cents. );
getAmounts( 67.1, dollars, cents );
writeln( $, dollars, and , cents, cents. );
getAmounts( 345.0, dollars, cents );
writeln( $, dollars, and , cents, cents. );
readln;
end.

I've got my basic layout I want to use but can't seem to code it correctly.


Related Articles and Replies:


] [ DelphiLand Discussion Forum ]
Compiling Console Applications
Learn Pascal with simple Delphi Console Applications