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”);
}
r…


This content originally appeared on DEV Community and was authored by Dev.Coder

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

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


This content originally appeared on DEV Community and was authored by Dev.Coder


Print Share Comment Cite Upload Translate Updates
APA

Dev.Coder | Sciencx (2022-07-14T16:49:08+00:00) Printing Right Triangle Star Pattern in c. Retrieved from https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/

MLA
" » Printing Right Triangle Star Pattern in c." Dev.Coder | Sciencx - Thursday July 14, 2022, https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/
HARVARD
Dev.Coder | Sciencx Thursday July 14, 2022 » Printing Right Triangle Star Pattern in c., viewed ,<https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/>
VANCOUVER
Dev.Coder | Sciencx - » Printing Right Triangle Star Pattern in c. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/
CHICAGO
" » Printing Right Triangle Star Pattern in c." Dev.Coder | Sciencx - Accessed . https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/
IEEE
" » Printing Right Triangle Star Pattern in c." Dev.Coder | Sciencx [Online]. Available: https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/. [Accessed: ]
rf:citation
» Printing Right Triangle Star Pattern in c | Dev.Coder | Sciencx | https://www.scien.cx/2022/07/14/printing-right-triangle-star-pattern-in-c/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.