I've finally gotten some loops nesting properly and building a type of pyramid. I'm not sure where I've gone wrong that the hashes are repeating a few times on the same line and the spaces (rendered as dots for now to make it clearer for myself) aren't behaving properly. Can anyone guide me to where I might fix my mistake? I'm happy I'm actually printing a semi-pyramid at least!!
the pseudocode for Mario
for height of pyramid for (calculate nr. of spaces at height) print ' ' for (calculate nr. of hashes at height) print '#' print a newline
I'd defer from saying more since, well, that would kill all the fun of the problem :)
Note that you've got other problems, too... your conditions aren't correct. You should use pen and paper to write out your conditions and manually write a table for each line, what the values of hash and sp are.