Vanilla 1.1.5a jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
program uklad;
var a,b,c,d,e,f,wx,wy,w,x,y : double;
begin
writeln('podaj a'); readln(a);
writeln('podaj b'); readln(b);
writeln('podaj c'); readln(c);
writeln('podaj d'); readln(d);
writeln('podaj e'); readln(e);
writeln('podaj f'); readln(f);
writeln('a=',a);
writeln('b=',b);
writeln('c=',c);
writeln('d=',d);
writeln('e=',e);
writeln('f=',f);
Wx:=c*e-b*f;
Wy:=a*f-c*d;
W:=a*e-d*b;
writeln('W=',w:1:4);
writeln('Wx=',wx:1:4);
writeln('Wy=',wy:1:4);
begin
if w=0 then
if wx=0 then
if wy=0 then writeln('Uklad ma nieskonczenie wiele rozwiazan bo W=0 Wx=0 Wy=0')
else writeln('Uklad sprzeczny')
else if wy=0 then
if wx=0 then writeln('Uklad ma nieskonczenie wiele rozwiazan bo W=0 Wy=0 Wx=0')
else writeln('Uklad sprzeczny')
else
begin
x:
wx/w); writeln('x=',x);
y:
wy/w); writeln('y=',y);
end;
end;
readln;
end.
program uklad;
uses crt;
var a,b,c,d,e,f,wx,wy,w,x,y : real;
begin
write('Podaj x1 : ');
readln(a);
write('Podaj y1 : ');
readln(b);
write('Podaj wyraz wolny : ');
readln(c);
clrscr;
write('Podaj x2 : ');
readln(d);
write('Podaj y2 : ');
readln(e);
write('Podaj wyraz wolny : ');
readln(f);
clrscr;
writeln('x1 = ',a:0:2);
writeln('y1 = ',b:0:2);
writeln('1 wyr = ',c:0:2);
writeln;
writeln('x2 = ',d:0:2);
writeln('y2 = ',e:0:2);
writeln('2 wyr =',f:0:2);
Wx:
c*e)-(b*f);
Wy:
a*f)-(c*d);
W:
a*e)-(d*b);
Writeln;
writeln('W = ',w:0:2);
writeln('Wx = ',wx:0:2);
writeln('Wy =',wy:0:2);
begin
Writeln;
if (w=0) and (wx=0) and (wy=0) then
begin writeln('Uklad ma nieskonczenie wiele rozwiazan bo W=0 Wx=0 Wy=0'); end;
if (w<>0) and (wx<>0) and (wy=0) then
begin writeln('Uklad sprzeczny'); end;
if (wy=0) and (wx=0) then
begin writeln('Uklad ma nieskonczenie wiele rozwiazan bo W=0 Wy=0 Wx=0'); end;
if (wy<>0) and (wx<>0) then
begin writeln('Uklad sprzeczny'); end;
Writeln;
x:
wx/w);
writeln('x = ',x:0:2);
y:
wy/w);
writeln('y = ',y:0:2);
end;
readkey;
end.
pozdrowionka Od 1 do 8 z 8