input a name and print the name in the following pattern
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{char a[15];
int b,c;
clrscr();
printf("enter name-:");
scanf("\n%s", &a);
for(b=0;b<strlen(a);b++)
{for(c=0;c<=b;c++)
printf("%c",a[c]);
printf("\n");
}
getch();
}
No comments:
Post a Comment