Contact Learn C
Copy Program Share Program

Program 304: Program to Display Reverse Number X Pattern

Program 304: Program to Display Reverse Number X Pattern
 
#include<stdio.h>
main()
{
 int len,i,j,rows;
 printf("Enter number of rows\n");
 scanf("%d",&rows);
 for(i=rows;i>=0;i--)
 {
  for(j=0;j<rows;j++)
  {
   if(i==j || i+j==rows-1)
   {
    printf("%d",i+1);
   }
   else{
    printf(" ");
   }
  }
  printf("\n");
 }
}
Explanation:

//Coming Soon...

Output:


Program to Display Reverse Number X Pattern


Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide