i want to print
myname
mynam
myna
myn
my
m
i have done in numbers but i can't print in string/char my code is
i want to print
myname
mynam
myna
myn
my
m
i have done in numbers but i can't print in string/char my code is
main()
{
clrscr();
int loop,count;
for( loop = 1; loop <= 5; loop = loop + 1 )
{
for( count = 1; count <= loop;count=count+1 )
printf("%d", count );
printf("\n");
}
getch();
}
my code out put is
12345
1234
123
12
1