Created
April 25, 2016 16:30
-
-
Save drage0/0bad11657cbda878f9847f637bf41534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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