[cfe-dev] Generate a tree in C language.
akhandal96
akhandal96 at gmail.com
Sat Mar 23 04:57:25 PDT 2013
Hey,
how to make a tree of the symbol "*"
my code is
#include <stdio.h>
#include <conio.h>
main(){
clrscr();
int a,b,c;
for(a=1;a<=10;a++)
{
for(b=1;b<=a;b++)
{
printf("*");
}
printf("\n");
}
getch();
}
and the output of it is
*
**
***
****
and it goes till the last line having 10 stars,I want the same but
backwards,
and it should be like this,a that a user inputs a value,say 15,then it
should generate the tree having first line 15 stars and the 2nd line 14
stars and so on till 1 star.
Please,I am a newbie to C,its been few days only I had started
learning,please reply soon.
Thanks a ton
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Generate-a-tree-in-C-language-tp4031110.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list