•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 455,965 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,655 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 700 | Replies: 3 | Solved
![]() |
•
•
Join Date: Nov 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hey guys im new here...
i need to make a program that estimates the costs of the following:
Materials
Ceiling: xx.x litres @ x.xx per litre 99.99
walls: xx.x litres @ x.xx per litre 999.99
xx rolls of paper @ xx.xx per roll 999.99
woodwork: xx.x litres @ x.xx per litre 99.99
Sub Total 999.99
VAT @ 17.5% 99.99
Final total 999.99
Request the inputs and use them to produce the estimate in the required format(see above).
Assume the following:
- each door occupies 2 square metres and requires 1 litre of paint
- each window occupies 2 square metres but requires only 0.5 litres of paint
- emulsion paint gives a coverage of 8 squre metres per litre
- emulsion paint costs £3.50 per litre
- Gloss paint gives a coverage of 6 square metres per litre
- gloss paint gives £4.00 per litre
- Wall paper rolls are 1m by 10m
- note: walls are either painted or wallpapered, not both
gloss paint is used on woodwork, emulsion everywhere else
paint is covered in 1 coat
repeat process untill there are no more estimates
the main thing im having trouble with is the structure of it.... how would you guys structure said assignment i have declared the following variables:
Var
customername : string;
width : integer;
length : integer;
windows : integer;
doors : integer;
squareM : integer;
ceilingcost : integer;
wallcost : integer;
woodworkcost : integer;
doors2 : integer;
windows2 : integer;
litres : real;
litres2 : real;
litres3 : real;
wallpaper : char;
wallpapaer2 : integer;
any help or advice would be appreciated, thanks.
i need to make a program that estimates the costs of the following:
Materials
Ceiling: xx.x litres @ x.xx per litre 99.99
walls: xx.x litres @ x.xx per litre 999.99
xx rolls of paper @ xx.xx per roll 999.99
woodwork: xx.x litres @ x.xx per litre 99.99
Sub Total 999.99
VAT @ 17.5% 99.99
Final total 999.99
Request the inputs and use them to produce the estimate in the required format(see above).
Assume the following:
- each door occupies 2 square metres and requires 1 litre of paint
- each window occupies 2 square metres but requires only 0.5 litres of paint
- emulsion paint gives a coverage of 8 squre metres per litre
- emulsion paint costs £3.50 per litre
- Gloss paint gives a coverage of 6 square metres per litre
- gloss paint gives £4.00 per litre
- Wall paper rolls are 1m by 10m
- note: walls are either painted or wallpapered, not both
gloss paint is used on woodwork, emulsion everywhere else
paint is covered in 1 coat
repeat process untill there are no more estimates
the main thing im having trouble with is the structure of it.... how would you guys structure said assignment i have declared the following variables:
Var
customername : string;
width : integer;
length : integer;
windows : integer;
doors : integer;
squareM : integer;
ceilingcost : integer;
wallcost : integer;
woodworkcost : integer;
doors2 : integer;
windows2 : integer;
litres : real;
litres2 : real;
litres3 : real;
wallpaper : char;
wallpapaer2 : integer;
any help or advice would be appreciated, thanks.
•
•
Join Date: Nov 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
ok! im stuck...it doesnt seem to be working correctly, this is what i have so far..
program Estimator;
var
height, width, length : real;
Ceiling, walls : real;
Paint1, Paint2 : real;
Cust: integer;
Litres1 : integer;
Litres2 : integer;
paperolls : integer;
doors : integer;
windows : integer;
Vat : real;
Total : real;
begin (* Main *)
writeln ('Joe Blakes Painting & Decorating Tel: 01522 522522');
readln;
writeln <'Enter the Customers name:'>;
readln<Cust>;
writeln <'Please Enter the dimensions of the room'>;
readln;
writeln<'Enter the height in metres:'>;
readln<height>;
write<'Enter the width in metres:'>;
readln<width>;
write<'Enter the length in metres:'>;
readln<length>;
Ceiling:=width*length;
paint1:=ceiling/8;
walls:=<length + width>*2*height;
paint2:= walls/6;
writeln<'ceiling needs',paint1:0:1,'litres');
write<'walls need',paint2:0:1,'litres');
end;
begin
litres1 := 03.50
litres2 := 04.00
end.•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,878
Reputation:
Rep Power: 13
Solved Threads: 193
I almost missed this because your thread is marked 'solved'.
That last thing is so full of errors I don't think you've spent much time reading over your textbook or class notes. It certainly won't compile, and most pascal compilers are pretty explicit about where and what errors you have, and how to go about fixing them.
Try again.
That last thing is so full of errors I don't think you've spent much time reading over your textbook or class notes. It certainly won't compile, and most pascal compilers are pretty explicit about where and what errors you have, and how to go about fixing them.
Try again.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Pascal and Delphi Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Turbo pascal Homework.. (Pascal and Delphi)
- The Onion: Myspace outage leaves millions friendless (Geeks' Lounge)
- Pascal Graphics help - bmp graphics (Pascal and Delphi)
- ***help Help Help*** (Legacy and Other Languages)
- Pascal database check (Pascal and Delphi)
- Turbo pascal homework (Pascal and Delphi)
- School assignment in pascal (Pascal and Delphi)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Gaussian elimination in pascal
- Next Thread: Stuck on school assignment



Linear Mode