C234567
      PROGRAM COMB
C
C.....Ypologizei tous suvduasmous N stoixeiwv ava K
C
      INTEGER K, N
      REAL FACTOR, RES
      WRITE(*,*) 'Dwse tous N kai K me K<=N'
      READ(*,*) N,K
      IF (K .GT. N) THEN
        WRITE(*,*)'Dwsate la0os ari0mous'
        STOP
      ENDIF
      RES = FACTOR(N)/(FACTOR(K)*FACTOR(N-K))
      WRITE(*,10)'Oi suvduasmoi',N,' stoixeiwv ava',K,' eivai:',INT(RES)
      STOP
 10   FORMAT(/,1X,A,I3,A,I3,A,I10,/)
      END


      FUNCTION FACTOR(L)
*
* Suvartnsn pou upologizei to L!
*
      REAL FACTOR
      INTEGER L,I
      FACTOR = 1.
      DO 10 I=2,L
        FACTOR = FACTOR * I
  10  CONTINUE
      RETURN
      END
