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


pattern making in c

Check Also

Restrict Mouse Pointer Position C Graphics Program

This C Program will restrict the Mouse Pointer location or to a particular position or x,y ...

Leave a Reply

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

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.