c program to print given number pattern

Write a c program to print given number pattern
0
00
000
0000
00000

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

Related Posts