Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses crt;
- var
- a,b,c,a1,b1,c1:integer;
- x,y,d,d1,d2:real;
- begin
- clrscr;
- write('Nhap a,b,c,a1,b2,c3:');
- readln(a,b,c,a1,b1,c1);
- d:=a*b1-b*a1;
- d1:=c*b1-b*c1;
- d2:=a*c1-c*a1;
- if (d=0) and ((d1<>0) or (d2<>0)) then writeln('Phuong trinh vo nghiem');
- if (d=0) and (d1=0) and (d2=0) then writeln('Phuong trinh vo so nghiem');
- if d<>0 then
- begin
- x:=d1/d;
- y:=d2/d;
- writeln('Nghiem cua phuong trinh la: x=',x,', y=',y);
- end;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment