# Befunge, 101 bytes

    &20p>:000pv
    >\1+^vp011<
    | >.@>:55+%:00g+00p10g*v>10g-*
    ::\$_^#!:/+55p01*!`"~":<^\-g00
    < |!-g02
    +1< v\

[Try it online!](http://befunge.tryitonline.net/#code=JjIwcD46MDAwcHYKPlwxK152cDAxMTwKfCA-LkA-OjU1KyU6MDBnKzAwcDEwZyp2PjEwZy0qCjo6XCRfXiMhOi8rNTVwMDEqIWAifiI6PF5cLWcwMAo8IHwhLWcwMgorMTwgdlw&input=NDA) But note that it's going to get really slow once you get into the high forties. If you want to test the full range, you really need to be using a Befunge compiler.