Advertisement
AlexMatveev

Untitled

Apr 24th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.46 KB | None | 0 0
  1. program lola1;
  2.  
  3. procedure det2x2(a11, a12, a21, a22:real; var ret: real);
  4. begin
  5.   ret:=a11*a22-a12*a21;
  6. end;
  7.  
  8. var
  9.         a1, a2, b1, b2, c1, c2, d1, d2, d: 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.         det2x2(c1, b1, c2, b2, d1);
  16.         det2x2(a1, b1, a2, b2, d);
  17.         det2x2(a1, c1, a2, c2, d2);
  18.         writeln('x=', d1/d, ' y=', d2/d);
  19. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement