Solved

Program to solve Simultaneous Equations invovling 2 unknowns

Posted on 2006-10-19
6
1,890 Views
Last Modified: 2008-02-01
Hi,

I just started Pascal and have an assignement I would really like help with.

Hereis my program, please have a look and update me where I have gone wrong.



/*   Program to Solve 2 Unknown s   */


Program multiplication;subtraction,division;

var
    a,b,c,d,e,f,x,y: integer;

begin
    read(a);
    read(b);
    read(c);
    read(d);
    read(e);
    read(f);
    y:=(c*d-a*f)/(b*d-a*e);
    x:=(c*e-b*f)/-(b*d-a*e);
    write (y);
    write (x);
end.






0
Comment
Question by:souldj
  • 5
6 Comments
 
LVL 6

Accepted Solution

by:
My name is Mud earned 500 total points
ID: 17767977
Program multiplicationsubtractiondivision;  (* Name of Program no punctuation allow *)

var
    a,b,c,d,e,f: integer;                            (* this variables to input values of integer type *)
    x,y: real;                                           (* You can perform divisions on integer variables *)

begin
  read(a);
  read(b);
  read(c);
  read(d);
  read(e);
  read(f);
  y:=(c*d-a*f)/(b*d-a*e);
  x:=(c*e-b*f)/-(b*d-a*e);
  write (y);
  write (x);
End.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 17768020
It is always a good thing to output to screen what the program will do and what the user have to do... like...

WriteLn('This program will perform the following formulas:');
WriteLn('y:=(c*d-a*f)/(b*d-a*e)');
WriteLn('x:=(c*e-b*f)/-(b*d-a*e)');

Write('Please enter the value for ''A''');
ReadLn(A);
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 17768027
x,y: real;                                           (* You can perform divisions on integer variables *)

sorry that should be "You CAN'T"...
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 6

Expert Comment

by:My name is Mud
ID: 17768056
Any question you might have, don't hesitage to post it... TY...
0
 
LVL 1

Author Comment

by:souldj
ID: 17768064
Thanks a lot whatboy!

0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 17768081
Glad I can help...
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change the mouse cursor 1 1,001
Display image from a link 4 499
Why does formely good SQL code in Delphi 2009 not work under Windows 10? 5 97
Virtuailstring tree compare node issue 14 117
An article on effective troubleshooting
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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