lots of ifs and stuff, I think writing it in SQ would look considerably cleaner, readable and consise
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
But - other than for pedagogy what practical app is this?
I've used Reynolds numbers for spiral flow, and Ulam's prime number spiral for fun (this looks like it's a relative).
Here's a picture and discussion of a prime number spiral with a box created somewhat the way these are.
maybe it makes sense looking at a visual example, so i drawed this (was drawn first on paper when i tried to solve the problem)
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.