DEV Community

Dev.Coder
Dev.Coder

Posted on

Printing Right Triangle Star Pattern in c

Code:

int main()

{

int n;

printf("Enter the number of rows");

scanf("%d",&n);

for(int i=1;i<=n;i++)

{

for(int j=1;j<=i;j++)

{

printf("* ");

}

printf("\n");

}

return 0;

}

=================================================

Output :

=================================================

Image description

=================================================

Top comments (0)