Number Pattern Program in C - 46


program for pattern in c


/*
Write a program in C for Number Pattern Program
*/

int main()
{
  int i,j,k;
  for(i=1;i<=4;i++)
  {
    for(j=1;j<=9;j++)
    {
      if(j==i || j==5 || 10-j==i)
        printf("*");
      else
        printf("0");
    }
    printf("\n");
  }
  return 0;
}

Post a Comment

0 Comments