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.

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Duoas

sorted.

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');
writeln <'Enter the Customers name:'>;
writeln <'Please Enter the dimensions of the room'>;
writeln<'Enter the height in metres:'>;
write<'Enter the width in metres:'>;
write<'Enter the length in metres:'>;
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.``````