sistem.pas
来自「This ar the basic programs that i did in」· PAS 代码 · 共 29 行
PAS
29 行
program sistem;
{ a*x + b*y = m
rezolvarea unui sistem de forma :
c*x + d*y = n }
var a,b,c,d,m,n:integer;
x,y:real;
begin
write('a= ');
readln(a);
write('b= ');
readln(b);
write('c= ');
readln(c);
write('d= ');
readln(d);
write('m= ');
readln(m);
write('n= ');
readln(n);
writeln('Sistemul als este : ',a,'*x + ',b,'*y = ',m);
writeln(' ',c,'*x + ',d,'*y = ',n);
if (a*d-b*c=0) then writeln('Sistemul ales nu are solutii')
else
begin
x:=(m*d-b*n)/(a*d-b*c);
y:=(a*n-c*m)/(a*d-b*c);
writeln('Sistemul ales are solutiile x= ',x:4:1,' si y= ',y:4:1);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?