Tuesday , January 23 2018
Home / C / c program for pattern13

c program for pattern13

 C program for pattern making


Here is given c program for following pattern. In the above pattern we have two triangle one is empty space triangle together with the shown triangle. That’s why we have to put the loop for empty spaces together with the loop for the shown triangle.

ALSO CHECK : Alternate Java program for this pattern

void main()
int i,j,n; 
printf("Enter the number of lines for triangle"); 
for(i=1;i<=n;i++) //loop for number of lines in triangle 
for(j=1;j<=n-i;j++) // loop for spaces printf(" "); 
for(j=i;j>=1;j--) // loop for pattern to be print printf("%d",j); 
printf("\n"); // for next line


Also See:   Program in C for coin toss

pattern making in c

Check Also

How to Solve Linear Equation in One Variable In C Programming?

C Program to Solve any Linear Equation in One Variable Find complete C program to ...

Leave a Reply

Your email address will not be published. Required fields are marked *