Solved

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

Posted on 2000-02-20
12
170 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Scenario: Your operations manager has discovered an anomaly in your security system. The business will start to suffer within 15 minutes if it is a major IT incident. What should she do? We have 6 recommendations for managing major incidents (https:…
When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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