Solved

I Have a pascal program that I'm having trouble with

Posted on 2000-02-20
12
186 Views
Last Modified: 2010-04-16
I have a problem with a pascal program if anybody that has expercience please e-mail at hpool@pdq.net and I will send it as a attachment. Thank you very much.
0
Comment
Question by:Hpool_12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 1

Expert Comment

by:nrico
ID: 2541861
This is generally not the way we handle things here at EE. You should ask your question right here, and maybe post the code to the program if you feel that explains your problem.

Rico
0
 
LVL 3

Expert Comment

by:sumant032199
ID: 2542088
Oh Hpool_12! Am I supposed to run after your question?
0
 

Expert Comment

by:foulc
ID: 2542113
Please post your source code right here
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:Hpool_12
ID: 2542205
what do you mean by a code
0
 

Expert Comment

by:foulc
ID: 2542265
You can post the source code of that program here , instead asking other to email you to get the source
0
 

Author Comment

by:Hpool_12
ID: 2542277
I don't know actually what you are talking about
0
 
LVL 12

Expert Comment

by:Hypo
ID: 2542347
foulc means that you should post the code that you are having problems with, here on EE. 'cuz that's the whole idea of the system. You ask a question here and we answeer it here.

So, if you post (a picece of) the code  here, we will be able to help you out!
0
 

Expert Comment

by:foulc
ID: 2542361
What is your problem actually?
0
 

Author Comment

by:Hpool_12
ID: 2542729
can I send you all the needed information that has been provided to me out of my book for this particular problem so you look and see what I'm doing wrong.
Program Comput_cost
   Uses
     CRT;
   VAR
      Cost,length,width,Total_Cost :real;
**************************************
Procedure GETDATA;
   Begin
     Clrscr;
     Writeln ('What is the room length in feet and press enter');
     Readln(length);
     Writeln('What is the room width in feet and press enter');
     Readln(width);
     Writeln('What is the carpet price/square yard and press enter');
     Readln(cost);
     Total_Cost :-((Cost * 2.4) * (Length * Width));

End;
Begin GETDATA

END.
 I'm having a problem with trying to figure out what to put in my run program.        
     
0
 
LVL 2

Expert Comment

by:kellyjj
ID: 2547654
Well, the 1st problem that

Begin GETDATA

END.

Should read  :

Begin main

END.

when this is ran,  you won't get anything, because the main program doesn't call anything.

if you wanted to call your proc then you should do this:

Begin main
    GetData
END.


Hope this gets you going.

0
 
LVL 33

Accepted Solution

by:
hongjun earned 10 total points
ID: 2549465
Program Comput_cost;
   uses wincrt;
   VAR Cost,length,width,Total_Cost :real;
 
procedure GETDATA;
   begin
     Clrscr;
     Writeln ('What is the room length in feet and press enter');
     Readln(length);
     Writeln('What is the room width in feet and press enter');
     Readln(width);
     Writeln('What is the carpet price/square yard and press enter');
     Readln(cost);
     Total_Cost := ((Cost * 2.4) * (Length * Width));
     WriteLn('Total cost is $',Total_Cost);

end;
begin GETDATA

end.


I have added one WriteLn command to inform user the total cost. Another error of your coding is the computation part. Total_Cost := is the correct one instead of Total_Cost :-

Hope it helps
hongjun
0
 

Author Comment

by:Hpool_12
ID: 2549936
thank you very much
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Part One of the two-part Q&A series with MalwareTech.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question