Program to solve Simultaneous Equations invovling 2 unknowns

souldj
souldj used Ask the Experts™
on
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.






Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Systems Engineer
Commented:
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.
My name is MudSystems Engineer

Commented:
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);
My name is MudSystems Engineer

Commented:
x,y: real;                                           (* You can perform divisions on integer variables *)

sorry that should be "You CAN'T"...
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

My name is MudSystems Engineer

Commented:
Any question you might have, don't hesitage to post it... TY...

Author

Commented:
Thanks a lot whatboy!

My name is MudSystems Engineer

Commented:
Glad I can help...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial