recent

c program to print given number pattern

Write a c program to print given number pattern
13579
3579
579
79
9

#include <stdio.h>
int main()
{
  int k,j;
  for(j=1;j<=9;j+=2)
  {
    for(k=j;k<=9;k+=2)
    {
      printf("%d",k);
    }
    printf("\n");
  }
}

Powered by Blogger.