need help for drawing a christmas tree with 3 for loop in c program
need help !!!!
anyone know how to draw a christmas tree in c program with 3 for loop ????????????
10 Months Ago
Last Updated
Related Article: Creating a binary tree
is a C discussion thread by samohtvii that has 1 reply, was last updated 8 months ago and has been tagged with the keywords: binary, tree.
on93
Junior Poster in Training
54 posts since Jul 2012
Reputation Points: -7
Solved Threads: 0
Skill Endorsements: 0
Infraction Points: 2
Here's the pseudocode, a little bit of thinking wouldn't have hurt you would it?
subalg. printChristmasTree(){
for (i<-0, i<5) do
for (j<-0, j<=i*2) do
for (k<-5, downto i) do
if (j=0) then
print space
end_if
print '*'
end_for
print new line
end_for
@print base of the tree
end_for
end_Subalg.
Lucaci Andrew
Practically a Master Poster
649 posts since Jan 2012
Reputation Points: 91
Solved Threads: 91
Skill Endorsements: 11
wht is the "do" represent ??? also a loop ???
on93
Junior Poster in Training
54 posts since Jul 2012
Reputation Points: -7
Solved Threads: 0
Skill Endorsements: 0
Infraction Points: 2
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 36
wht is the "do" represent ??? also a loop ???
Represents an action, what should the for DO with the given conditions/inputs.
Lucaci Andrew
Practically a Master Poster
649 posts since Jan 2012
Reputation Points: 91
Solved Threads: 91
Skill Endorsements: 11