#include<stdio.h>
#include<conio.h>
int main()
{
int x, ctr, input;
printf("\n Enter Length: ");
scanf("%d",&input);
printf("\n Enter Character: ");
char val = getche();
printf("\n");
for(x = 1; x <= input; x++)
{
printf("\n");
for(ctr = input; ctr >= x ; ctr--)
{
printf("%c",val);
}
}
getch();
}
Output
*****
****
***
**
*
1 comments:
thanks for the post
Post a Comment