Write a c program to print given number pattern

Write a c program to print given number pattern
65432*
6543*1
654*21
65*321
6*4331
*54321

#include<stdio.h>
int main()
{
  int k,j;
  for(k=1;k<=6;k++)
  {
    for(j=6;j>=1;j--)
    {
      if(k==j)
        printf("*");
      else
        printf("%d",j);
    }
    printf("\n");
  }
}

Related Posts