Learn about Right angle triangle Pattern Program in C in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.
Right angle triangle Pattern Program in C
pattern: To print the below pattern in C programming then run the below code.
* * * * * * * * * * * * * * *
Program:
#include<stdio.h>
int main()
{
int i,j,k;
for(i=1;i<=5;i++)
{
for(j=i;j<5;j++)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("* ");
}
printf("\n");
}
return 0;
}
Output:
* * * * * * * * * * * * * * *
Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.
Similar Codes :
Pattern Programs 16 in C
Pattern Program 15 in C