# include <; stdio.h>
int main()
{
int i,j,k,n;
scanf("%d",& n);
for(i=1; i< =n; i++)
for(j=1; j< =i-n; j++)
printf(" ");
for(k=1; k< =2*i-1; k++)
printf("*");
printf("\n");
}
This is an isosceles triangle;
int i,j,n;
scanf("%d"& n);
for(i=1; i< =n; i++)
{
for(j=1; j< =i; j++)
{
printf(" ");
printf("*");
}
printf("\n");
}
This is a right triangle; Use two for, an outer loop and an inner loop. This is the foundation, come on!