fork(1) download
  1. FUNCTION FACT(N)
  2. INTEGER FACT
  3. FACT=1
  4. DO 7 K=1,N
  5. FACT= FACT*K
  6. 7 CONTINUE
  7. RETURN
  8. END
  9. INTEGER FACT
  10. READ*,X
  11. SUM=0.0
  12. J=1
  13. DO 10 I= 1,N,2
  14. SUM=X**I/REAL(FACT(I)*J)
  15. J=-J
  16. 10 CONTINUE
  17. PRINT*,'SIN(X)=',SUM
  18. STOP
  19. END
Success #stdin #stdout 0s 5288KB
stdin
1
stdout
 SIN(X)=   0.00000000E+00