Prints numbers from 0 up to a given integer in a spiral