Pattern in C ( Number Pattern 1)

 Number Pattern 1                             


N=32767


3 2 7 6 7

2 7 6 7

7 6 7

6 7

7


#include <stdio.h>

#include<conio.h>

void main()

{

    long n = 32767, i=1;

    for(i=10;i<n;i*=10);


    for (i=i/10; n>0; i/=10)

    {

        printf("%d\n", n);

        n%=i;

    }

getch();

}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.