Pattern 6

Description:

Write a program to print the given pattern. Input Format: Input consists of a single integer. Output Format: Refer sample output. There is a trailing space at the end of each line. Sample Input: 5 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5

Program :

 #include<stdio.h>
int main(){
  int n,i,j;
  scanf("%d",&n);
  for(i=n;i>=1;i--)
  {
    for(j=i;j<=n;j++){   
      printf("%d ",j);
    
    }
    printf("\n");
  } 
  return 0;
}