Skip to content

Instantly share code, notes, and snippets.

@drage0
Created April 25, 2016 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drage0/0bad11657cbda878f9847f637bf41534 to your computer and use it in GitHub Desktop.
Save drage0/0bad11657cbda878f9847f637bf41534 to your computer and use it in GitHub Desktop.
PROGRAM z44;
TYPE niz = ARRAY[1..100] OF integer;
VAR
x: niz;
n: integer;
PROCEDURE unos(n: integer; var x: niz);
VAR i: integer;
BEGIN
FOR i:=1 TO n DO
BEGIN
write('x[', i, ']=');
readLn(x[i]);
END;
END;
FUNCTION b_dvc(n: integer): boolean;
BEGIN
IF((n>9) and (n < 100)) THEN b_dvc := true
ELSE b_dvc := false;
END;
FUNCTION dvcifn(n: integer; x: niz): integer;
VAR i: integer;
BEGIN
dvcifn := 0;
FOR i:=1 TO n DO
BEGIN
IF(b_dvc(x[i])) THEN dvcifn := dvcifn + 1;
END;
END;
BEGIN
write('n=');
readLn(n);
unos(n, x);
writeLn('Broj dvocifrenih clanova: ', dvcifn(n, x));
readLn();
END.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment