User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Nov 2007
Posts: 6
Reputation: AlexN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AlexN AlexN is offline Offline
Newbie Poster

pascal assignment help

  #1  
Nov 19th, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Posts: 6
Reputation: AlexN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AlexN AlexN is offline Offline
Newbie Poster

Re: pascal assignment help

  #2  
Nov 19th, 2007
sorted.
Reply With Quote  
Join Date: Nov 2007
Posts: 6
Reputation: AlexN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AlexN AlexN is offline Offline
Newbie Poster

Help Re: pascal assignment help

  #3  
Nov 19th, 2007
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.
Reply With Quote  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,878
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 13
Solved Threads: 193
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: pascal assignment help

  #4  
Nov 21st, 2007
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Pascal and Delphi Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Pascal and Delphi Forum

All times are GMT -4. The time now is 9:04 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC