diff options
-rw-r--r-- | DEBI.FOR | 15 | ||||
-rw-r--r-- | NAST.FOR | 11 | ||||
-rw-r--r-- | SRC.FOR | 10 | ||||
-rw-r--r-- | VZV.FOR | 7 | ||||
-rwxr-xr-x | a.out | bin | 0 -> 25172 bytes |
5 files changed, 43 insertions, 0 deletions
diff --git a/DEBI.FOR b/DEBI.FOR new file mode 100644 index 0000000..9431c82 --- /dev/null +++ b/DEBI.FOR @@ -0,0 +1,15 @@ + SUBROUTINE DEBI(A,B) +C +C PRETVARJA POZITIVNO CELO STEVILO REAL Z OSNOVO 10 (A - VKLJUCNO 128.) +C V BINARNO (B - 10000000.). BREZ OPOZORIL. SE IZDELATI. +C + C=AMOD(A,2.) + A=AINT(A/2.) + B=C + DO 10 I=1,1000 + IF(A.EQ.0) RETURN + C=AMOD(A,2.) + A=AINT(A/2.) +10 B=B+C*(10**I) + RETURN + END diff --git a/NAST.FOR b/NAST.FOR new file mode 100644 index 0000000..6da0509 --- /dev/null +++ b/NAST.FOR @@ -0,0 +1,11 @@ + SUBROUTINE NAST(IS,IND) + ISS=IS + IND=0 + DO 10 I=1,1000 + IND=MOD(MOD(ISS,10),2) + IF(IND.EQ.1) RETURN + ISS=INT(ISS/10) + IF(ISS.EQ.0) RETURN +10 CONTINUE + RETURN + END @@ -0,0 +1,10 @@ + SUBROUTINE SRC(IPA,N,IND) + DIMENSION IPA(1),IP(10) + DO 10 I=1,N + A=IPA(I) + CALL DEBI(A,B) +10 IP(I)=B + CALL VZV(IP,N,IS) + CALL NAST(IS,IND) + RETURN + END @@ -0,0 +1,7 @@ + SUBROUTINE VZV(IZV,N,IVSOTA) + DIMENSION IZV(1) + IVSOTA=0 + DO 10 I=1,N +10 IVSOTA=IVSOTA+IZV(I) + RETURN + END Binary files differ |