Number Pattern 41 – Pyramid pattern in C programming

Spread the love

Number Pattern 41-Pyramid pattern in C programming

Pyramid pattern in C programming

In this program, we will see the Pyramid pattern numbers in C programming language. Please look into the program.

1
10
101
1010
10101

The C program for Pyramid pattern is as follows:

#include<stdio.h>
int main()
{
  int a,b,no_rows;
  printf("Enter number of rows - "); 
  scanf("%d",&no_rows);
 
  for(a=1;a<=no_rows;a++)
  {
    for(b=1;b<=a;b++)
    {
      printf("%d",b%2);
    }
    printf("n");
  }
  getch();
  return 0;
}

Number Series Programs in C programmming

Star Pattern Programs in C programmming

Number Pattern Programs in C programmming

Alphabet Pattern Programs in C programmming


Spread the love

Leave a Comment