Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

Help at making a tree trunk

$
0
0
Hello to all
I am a beginner is pascal and i am trying to make a tree trunk that grows acording to the rest of the tree.
I already made the tree itself (here it is):

program Isosceles;
Uses Crt;
var num_lines, line:Integer;
procedure printline (num_esp, num_ast:Integer);
const aster='*';
esp=' ';
var counter:Integer;
begin
for counter:=1 to num_esp do
write(esp);
for counter:=1 to num_ast do
write(aster);
writeln
end;
begin (*Main program*)
writeln ('Height of the tree= ');
readln(num_lines);
for line:=1 to num_lines do
printline(num_lines-line,2*line-1);
readln;
end.


But now i am stuck and cant figure out how to make the tree trunk

I <------This part i want it to grow as the tree gets bigger(this part needs to be added at the bottom of the tree).



Help would be much appreciated

ps:I am usig Dev-Pascal 1.9.2.


Viewing all articles
Browse latest Browse all 2703

Trending Articles