perl program

My worst mathematical program in perl

I have a Mathe-crap-matical friend. Who keeps digging into graves of dead formulas and equations and all possible Math related stuffs. Since I started understanding Mathematics (that it’s not my cup of tea), I tried to stay away from it. Now, that enthu creature mailed me his requirement. He says he “eat mathematics”, I prefer to stay away from such guys. But as a good friend I read his mails. His requirement was to create a program. His requirements are: N is a natural number falling in range [1 – 999999] X is a number given by user with range...