Number Pattern 50 – Rectangle pattern in C programming

Spread the love

Number Pattern 50-Rectangle pattern in C programming

Rectangle pattern in C programming

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

55555
45555
34555
23455
12345

The C program for Rectangle pattern is as follows:

#include <stdio.h>

int main()
{
  int a, b, k;
  
  for(a=5;a>=1;a--)
  {
    k = a;
    for(b=1;b<=5;b++)
    {
      if(k <= 5)
      {
        printf("%d",k);
      }
      else
      {
        printf("5");
      }
      k++;
    }
  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