Solved

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

Posted on 2000-02-20
12
173 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Drive Types 2 475
Interbase BDE 4 455
Pascal equivalent of VB Select/case 3 341
Intraweb submit form as a POST request 4 303
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
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 …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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