lazarus simple program一問

2014-10-04 6:40 am
program project1;

var a,b,c,x1,x2:real;

begin
readln(a,b,c);
x1:=(-b+sqrt((b*b)-(4*a*c)))/2*a;
x2:=(-b-sqrt((b*b)-(4*a*c)))/2*a;
writeln(x1);
writeln(x2);

readln
end.
唔知點解我入3 4 1
x1岩但x2錯

回答 (1)

2014-10-06 3:03 am
✔ 最佳答案
x1:=(-b+sqrt((b*b)-(4*a*c)))/(2*a);
x2:=(-b-sqrt((b*b)-(4*a*c)))/(2*a);

!???
參考: ME


收錄日期: 2021-04-18 00:24:40
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20141003000051KK00113

檢視 Wayback Machine 備份