FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
Right Side Triangle by asterisk Pyramid
Right Side Triangle by asterisk Extended - Pattern - C Language
1253    Arnab De    01/07/2019

### Write a C Program to print the pattern shown in the figure [Right Side Triangle Extended]

In this type of program we always find how many column present in a particular row. Because we know that we are always print in VDU horizontally. Here column number is same as row number and the spaces are present at the right side of the character is equal to the (total no of row - current row). It is Left Side Triangle. Add a space after asterisk.

```#include <stdio.h>

int main()
{
int r,c,n;
printf("Enter Total Number of row : ");
scanf("%d",&n);

for(r=0;r<n;r++)
{
for(s=0;s<=n-r;s++)
{
printf(" ");
}
for(c=0;c<=r;c++)
{
printf("* ");
}
printf("\n");

}

return 0;
}
```

### OUTPUT :

Enter Total Number of row : 6

```     *
* *
* * *
* * * *
* * * * *
* * * * * *
```
Right Side Triangle by asterisk Pyramid
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
We come nearest to the great when we are great in humility.
Rabindranath Tagore
25385
52.74
Today So Far
Total View (Lakh)
26/05/2018     42029
01/01/2018     36003
28/06/2017     34089
25/06/2018     33447
02/08/2017     32401
01/08/2017     26863
06/07/2017     26791
15/05/2017     26417
14/07/2017     21855
21/04/2018     20717