fork(1) download
  1. FUNCTION F(X)
  2. IF(X.LT.2.0)F=2.0*X**2-3.0*X+4.0
  3. IF(X.EQ.2.0)F=0.0
  4. IF(X.GT.2.0)F=2.0*X**2+3.0*X+1.0
  5. RETURN
  6. END
  7. READ*,X
  8. FX=F(X)
  9. PRINT*,'f(X)=',FX
  10. STOP
  11. END
Success #stdin #stdout 0.01s 5284KB
stdin
3
stdout
 f(X)=   28.0000000