Solved

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

Posted on 2000-02-20
12
185 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
Multi-threading long-running processes can have a significant increase in overall performance and drastically decrease over time it takes for a process to complete. Unfortunately, not all applications support native multi-threading, some by design a…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

729 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