This is my first time posting in here, hopefully I am doing it right.
Basically I need help trying to figure out some code that I wrote for class using C. The purpose o
You should use indentatation to make your code more readable and therefore easier to understand.
What your code does is print user_i
lines that consist of user_i-tall+1
spaces and then tall+1
hashes. Because the iteration index tall
increases with every pass this means that one more hash is printed. They are right aligned because a space is left out as well. Subsequently you have 'growing' rows of hashes that form a pyramid.
What you are doing is equivalent to this pseudo code:
for every i between 0 and user_i do:
print " " (user_i-i+1) times
print "#" (i+1) times