Umiestnenie súboru www.TrSek.com/zadania/scitanie3.pas
{ SCITANIE3.PAS                                  Copyright (c) Pheo }
{ Program na sèítanie n náhodných èísel s rozhodnutím o párnosti    }
{ (nepárnosti) súètu.                                               }
{                                                                   }
{ Datum:24.4.2003                             http://www.trsek.com }

program scitanie3;
uses crt;
var a,b,i,n,s:integer;

BEGIN
  randomize;
  writeln('zvol pocet cisel:');
  read(n);
  write('s=');
  
  for i:=1 to n do
   begin
     a:= random(100);
     write(a,'+');
     S:=S+A;
   end;
   
  writeln('=',s);
  if s mod 2=0  THEN
     writeln ('sucet s= ',s,' je parny ')
  else
     writeln ('sucet s=',s,' je neparny');
     
  repeat until keypressed;
end.

Copyrigth by Zdeno Sekerak 2007, http://www.trsek.com