Localize file www.TrSek.com/zadania/postupka.pas{ POSTUPKA.PAS Copyright (c) TrSek alias Zdeno Sekerak }
{ Zisti kolko je v postupnosti cisel kladnych a kolko zapornych }
{ Vstup : postupnost cisel }
{ Vystup: pocet kladnych, zapornych cisel a cisel rovnych nule }
{ }
{ Datum:10.04.2000 http://www.trsek.com }
program postupnost;
const max=100;
var pole:array[1..max] of real;
n,poc_k,poc_z,poc_n,i: integer;
begin
Write('Zadaj pocet cisel N:');
ReadLn(n);
poc_k:=0; poc_z:=0; poc_n:=0;
for i:=1 to n do begin
Write('Zadaj Pole[',i,']=');
ReadLn(pole[i]);
if( pole[i]>0 ) then poc_k:=poc_k+1;
if( pole[i]<0 ) then poc_z:=poc_z+1;
if( pole[i]=0 ) then poc_n:=poc_n+1;
end;