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=SUM+REAL(J)*(X**I/REAL(FACT(I)))
  15. J=-J
  16. 10 CONTINUE
  17. PRINT*,'SIN(X)=',SUM
  18. STOP
  19. END
Success #stdin #stdout 0.01s 5272KB
stdin
1
stdout
 SIN(X)=   0.00000000E+00