Jamie
Member
Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
|
program WrkSh4Q1;
VAR oldsalary,newsalary,monthlysal,weeklysal:real;
PROCEDURE Getoldsalary;
begin
writeln('Please enter previous annual salary')
readln(oldsalary);
writeln;
end;
PROCEDURE Getnewsalary;
begin
newsalary:=oldsalary+(oldsalary * 0.099)
writeln;
end;
PROCEDURE Getmonthlysal;
begin
monthlysal:=newsalary/12
writeln;
end;
PROCEDURE Getweeklysal;
begin
weeklysal:=newsalary/52
writeln;
end;
{$APPTYPE CONSOLE}
begin
{ TODO -oUser -cConsole Main : Insert code here }
Getoldsalary;
Getnewsalary;
Getmonthlysal;
Getweeklysal;
writeln(newsalary:3:2);
writeln(monthlysal:3:2);
writeln(weeklysal:3:2);
readln;
end.
|
Jamie
Member
Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
|
Errors on
7
16
23
30
|
PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
your not trailing all the lines with a semi colon...
only the End. and Begin statements dont have one
Also, your in Delphi.. you can't use the WRITELN statement unless your coding a console app... If its a regular windows program, you either paint the text (hard) or just add labels to the form & change the value (easy)
|
Jamie
Member
Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
|
Using Console Application
Forgot to use ; after newsalary, weeklysal, mothly etc
cheers mate
|
PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
|