Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USING: io kernel math math.parser strings sequences locals ascii ;
- IN: template
- :: test ( out d n -- a b c )
- n 1 =
- [ out d n ]
- [
- n
- d
- mod 0 =
- [
- out
- length
- 0 =
- [ d number>string ]
- [ out "*" append d number>string append ]
- if
- d
- n d /
- ]
- [ out d 1 + n ]
- if
- test
- ]
- if ;
- ""
- 2
- readln string>number
- test
- drop
- drop
- print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement