recent

program to print given number pattern

Write a c program to print given number pattern
1
123
12345
1234567
123456789


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