Jeff Verdegan wrote:
Sarah Mitchell wrote:
4- And here, I was able to modify your code to get you what you want :
Please don't do that. This site is NotACodeMill.(⇐click) Doing somebody's work for him does not help him to learn. As it says on the topics page: "We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers."
Oops. I'm sorry I thought I'm helping !
Won't happen in the future, promise >.<
Collin Sampson wrote:Thanks for the help. I both wrote it out and looked at the code provided. Makes sense now.
initialization = size -1
boolean expression = numStars >= 0
change = numStars-- (one less star on each line)
Yes, but this only goes for the second half of the triangle, because if we didn't add the -1 there will be a duplication for the row in the middle, and I guess we don't want this. Right ?