//prints a pine tree of height x plus something //-------------------------- //the parameter of the code, it must be positive x = 15; //----------------- //the actual code //first build the branches i = 1; while i <= x do a = x - i; while a > 0 do print " "; a = a - 1; endwhile b = 2*i - 1; while b > 0 do print "*"; b = b - 1; endwhile print newline; i = i + 1; endwhile //now build the base of the tree i = 1; while i <= x/3 do a = x - (x/4); while a > 0 do print " "; a = a - 1; endwhile b = 2*(x/4) - 1; while b > 0 do print "+"; b = b - 1; endwhile print newline; i = i + 1; endwhile