| | |
Procedure Repeat Loop
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jan 2006
Posts: 4
Reputation:
Solved Threads: 0
Please help me with the End on this problem. I just can't seem to finish it off properly. I keep getting a parse error on the last End.
program ValueParameters (input,output);
{Author: Cheryl Wahlheim
Class: CS241XP
Assignment: User Income and Tax Rate procedure}
Var income, taxrate, totaltaxdue : real; response : char;
Procedure Taxes;
Begin
writeln('Welcome to Your Friendly Tax Service');
writeln('Your declared income is $',income:8:2);
writeln('Your tax rate is ',taxrate:2:2,'%');
writeln('Your Total Tax Due is $',totaltaxdue:7:2)
End;
Begin
writeln('Enter your income and tax rate.');
writeln('Note: tax rate should be entered as a percentage.');
readln;
totaltaxdue := income*(taxrate/100);
Begin
Repeat
writeln('Do you want to enter your income and tax rate again? (Y/N)');
readln(response);
if (response = 'Y') or (response = 'y') then
Taxes
else
if (response = 'N') or (response = 'n')then
writeln('We are done.');
readln
End;
End.
program ValueParameters (input,output);
{Author: Cheryl Wahlheim
Class: CS241XP
Assignment: User Income and Tax Rate procedure}
Var income, taxrate, totaltaxdue : real; response : char;
Procedure Taxes;
Begin
writeln('Welcome to Your Friendly Tax Service');
writeln('Your declared income is $',income:8:2);
writeln('Your tax rate is ',taxrate:2:2,'%');
writeln('Your Total Tax Due is $',totaltaxdue:7:2)
End;
Begin
writeln('Enter your income and tax rate.');
writeln('Note: tax rate should be entered as a percentage.');
readln;
totaltaxdue := income*(taxrate/100);
Begin
Repeat
writeln('Do you want to enter your income and tax rate again? (Y/N)');
readln(response);
if (response = 'Y') or (response = 'y') then
Taxes
else
if (response = 'N') or (response = 'n')then
writeln('We are done.');
readln
End;
End.
![]() |
Similar Threads
- Pascal assistance (Pascal and Delphi)
- IT project help (Pascal and Delphi)
- String to real and real to String (Assembly)
- Help With Transposition Cipher Loop ... (C++)
- Serious help needed ASAP error message!!!! (Pascal and Delphi)
- file save load problems (C++)
- Cannot format hard drive due to virus (Windows NT / 2000 / XP)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Serious help needed ASAP error message!!!!
- Next Thread: How to pre-set second VGA as MDA?
| Thread Tools | Search this Thread |





