Search C Program

Number Pattern - 16

13579
3579
579
79
9

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



Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C


3 comments:

  1. for(int i=1;i<=5;i++)
    { if(i%2==1)
    k=1;
    else
    k=2;

    for(int j=1;j<=i;j++)
    {

    System.out.print(k);
    k=k+2;
    }
    System.out.println();
    }

    ReplyDelete
  2. #include

    int main()
    {
    int i,j;
    for(i=1;i<=5;i++)
    {
    for(j=(2*i-1);j<=9;j+=2)
    printf("%d ",j);
    printf("\n");
    }
    }

    ReplyDelete
  3. i can have another code for this program

    ReplyDelete