- 计算器的改良
- 2010-04-08 17:54:36 @
var
s,s1,s2,s3:string; c:char;
i,j,l,l1,l2,w:integer; a,b,m:real;
begin
readln(s); l:=length(s); w:=pos('=',s); a:=0; b:=0;
for i:=1 to l do
if ((s[i]'9')) and (s[i]'-')
and (s[i]'=') and (s[i]'+') and (s[i]'.') then begin c:=s[i]; break; end;
s1:=copy(s,1,w-1); s2:=copy(s,w+1,l-w);
l1:=length(s1); l2:=length(s2);
while l1>0 do
begin
i:=2;
while (i0 do
begin
i:=2;
while (i
2 条评论
-
yuyilahanbao LV 10 @ 2014-01-04 19:07:31
我也是第五个一开始错了,因为第**五个我输出的竟然是-0.000,而答案是0.000**
吃了一次亏呀 -
2013-10-07 13:23:56@
你用pascal试一试,数据:-x=0
如果输出-0.000是错的。应该是0.000
- 1