#include <stdio.h>
#include <conio.h>
#include<math.h>


void main()
{
int n,i,j,m,k;
clrscr();
printf("Enter the No :- ");
scanf("%d",&n);

m=n;
for(i=1;i<=n;i++)
{
    printf("\n");
    for(k=1;k<=2*m-1;k++)
    {
    printf(" ");
    }
    for(j=1;j<=i;j++)
    {
     printf(" *");
    }


    m--;
}
getch();
system("pause");
return 0;
}

?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.