Tema: Re: Gal kas del Pascal'io padetu?
Autorius: Jomajo
Data: 2008-05-16 20:28:31
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.
>
>