Star Pattern in in the form of right angle triangle fron left side
// *
// **
// ***
// ****
// like this
# include<stdio.h>
int main()
{
int a,b,c,d;
printf("Enter the Number till you get the star pattern :\n");
scanf("%d",&a);
for (b=0;b<a;b++)
{
for (c=0;c<a-b-1;c++)
{
printf(" ");
}
for (c=0;c<=b;c++)
{
printf("*");
}
printf("\n");
}
return 0;
}
Comments
Post a Comment