Advertisement
AlexMatveev

Untitled

Apr 24th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.44 KB | None | 0 0
  1. program lola1;
  2.  
  3. function det2x2(a11, a12, a21, a22: real): real;
  4. begin
  5.   det2x2:=a11*a22-a12*a21;
  6. end;
  7.  
  8. var
  9.   x, y, a1, a2, b1, b2, c1, c2: real;
  10. begin
  11.         writeln('Put a1, b1, c1');
  12.         readln(a1, b1, c1);
  13.         writeln('Put a2, b2, c2');
  14.         readln(a2, b2, c2);
  15.         x:=det2x2(c1, b1, c2, b2)/det2x2(a1, b1, a2, b2);
  16.         y:=det2x2(a1, c1, a2, c2)/det2x2(a1, b1, a2, b2);
  17.         writeln('x=', x, ' y=', y);
  18. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement