fork download
  1. USING: formatting io kernel locals math math.functions math.parser ;
  2. IN: quadratic-example
  3.  
  4. :: quadratic-equation ( a -- )
  5. a 0 =
  6. [ ]
  7. [
  8. a a * :> c
  9. c 3 * a - 2 / :> d
  10. d "%d" printf
  11. ]
  12. if ;
  13.  
  14.  
  15. readln string>number
  16. quadratic-equation
Success #stdin #stdout 1.32s 164864KB
stdin
5
stdout
35