#2391: Pascal Newbie help


dailinyang (da)


Hi, all:

Please help me to solve this problem. This Code works fine on my computer. But it doesn't work on this Site. Here is the Code.

program Files;
var
   a: INTEGER;
   b: INTEGER;
 
begin
while not eof do
begin
      readln(a,b);
      a := a+b;
      writeln( a );
end;
end.

 

THX.

#2393: Re:Pascal Newbie help


morris1028 (碼畜)


Hi, all:

Please help me to solve this problem. This Code works fine on my computer. But it doesn't work on this Site. Here is the Code.

program Files;
var
   a: INTEGER;
   b: INTEGER;
 
begin
while not eof do
begin
      readln(a,b);
      a := a+b;
      writeln( a );
end;
end.

 

THX.

我得到一個AC ... 內容如下 (我不會PASCL,所以沒辦法詳細的解釋)

var
   a: longint;
   b: longint;
 
begin
while not eof do
begin
      readln(a,b);
      a := a+b;
      writeln( a );
end;
end.

#2394: Re:Pascal Newbie help


dailinyang (da)


瞭解,原來是產生溢位了。

謝謝指教。