bug'as: padaugina iš nulio. pakeisti x>n į (x>n) and (x<>0) "Jomajo" <no@no.no> wrote in message news:g0kg7v$osv$1@trimpas.omnitel.net... > pastebeta klaida, jeigu n ivedi pavyzdziui -5 o sekos skaicius -2 ir 5 tai > turetu kaip ir gautis -10 o gaunamas 0 > "zZz" <zZz@zirzilia.lt> wrote in message > news:g0jm0v$lk4$1@trimpas.omnitel.net... >> var >> s, x, n :longint; >> b: boolean; >> begin >> s:=1; b:=false; >> write('n: '); readln(n); >> writeln('Seka:'); >> repeat >> read(x); >> if x>n then >> begin >> s:=s*x; >> b:=true; >> end; >> until x=0; >> if b then writeln('Sandauga yra: ', s) >> else writeln('Nerasta'); >> end. >> >> > >