|
|
вернуться в форумWrong answer of pascal Послано Sergey 29 авг 2011 15:39 it seems all right, it says: "Wrong answer." Why? program sum; var a,suma,I:longint; begin writeln('Vvedite chislo'); suma:=0; readln(a); if (a<0) and (a>-10000) then For i:=1 downto a do suma:=suma+i; if (a>0) and (a<10000) then fOR I:=1 to a do suma:=suma+i; if (-10000<a)and(a<10000) then writeln(suma) else writeln('oshibka vvoda'); end. |
|
|