Monday, November 29, 2010

//words in triangle form

#include
#include
void main()
{
char string[30];
int i;
printf("\n enter the string\t");
scanf("%s",string);
for(i=0;string[i]!='\0';i++)
{
for(j=0;j<=i;j++)
{
printf("\t%c",string[j]);
}
printf("\n");
}
getch();
}

No comments:

Post a Comment