Sunday, 18 September 2016

Number pattern N=39714

N=39714

3 9 1 7 4
9 1 7 4
1 7 4
7 4
4

code:

#include <stdio.h>

int main()
{
long n = 39714, i=1;
for(i=10;i<n;i*=10);

for (i=i/10; n>0; i/=10)
{
printf("%d\n", n);
n%=i;
}

return 0;
}



No comments:

Post a Comment

Featured post

Will AI Replace Programmers? The Truth Behind the Hype in 2025

Exploring the Future of Coding: Will AI Take Over Software Development or Enhance It?  Will AI Replace Programmers? The Truth Behind the Hyp...