Program ProgramName;
CONST
   COnstantName = 5;
TYPE
  TypeName = Integer;
  ArrayType = [1..10] OF Integer;
VAR
  VarName: TypeName;
  a : ArrayType;
  n, NumPos : Integer;

FUNCTION NumPositives(MyArray  : ArrayType; NumValues : Integer) : Integer;
  VAR
    i, Count : Integer;
  BEGIN
    Count := 0;
    FOR i := 1 TO NumValues DO
      IF MyArray[i] > 0
        THEN Count := Count + 1;

    NumPositives := Count;
  END;  { NumPositives }

PROCEDURE ReadArray;
 
  BEGIN
    FOR i := 1 TO 10 DO
      BEGIN
        Write("Enter a value ?");
        ReadLn(a[i]);
        n := n + 1;
      END;  { for }
  END; { ReadArray } 

PROCEDURE WriteAnswer;
 
  BEGIN
    Write("There are ", NumPos, " positive values.");

  END; { ReadArray } 

BEGIN
  ReadArray;
  NumPos := NumPositives(a, n);
  WriteAnswer
END.