Solved

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

Posted on 2000-02-20
12
168 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
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
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now