×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Right Side Triangle by asterisk
Left Side Triangle by asterisk - Pattern - C Language
2728    Arnab De    29/06/2019

Write a C Program to print the pattern shown in the figure

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 as spaces are present at the right side of the character then we can ignore it. It is Left Side Triangle.

softetechnologies
#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(c=0;c<=r;c++)
        {
            printf("*");
        }
        printf("\n");
    
    }
    
    return 0;
}
softetechnologies

OUTPUT :

Enter Total Number of row : 6

*
**
***
****
*****
******
softetechnologies
Right Side Triangle by asterisk
softetechnologies
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.
Swami Vivekananda
Fill the brain with high thoughts, highest idrals, place them day and night before you, and out of that will come great work.
Swami Vivekananda
2361
76.92
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     52684
25/06/2018     44415
01/01/2018     43158
28/06/2017     40865
02/08/2017     39802
01/08/2017     33902
06/07/2017     33713
15/05/2017     32965
11/09/2018     29408
14/07/2017     29317
softetechnologies