Jump to content

ShadowMorph

Member
  • Posts

    15
  • Joined

  • Last visited

Reputation Activity

  1. Like
    ShadowMorph reacted to mariushm in Need help to fill 6*****05   
    Separate your number into 3 :
     
    * The fixed digit 6
    * The 5 digits that change
    * the last 2 digits that are fixed at 05
     
    Now look at a number, let's say first number you can write : 60 000 005
    If you look carefully you can also write this number as : 60 000 000  + value * 100  + 5
     
    Now you can go even further and use a variable that can have a value from 0 to 99 999 in order to generate all those numbers  :  60 000 000 + ( value) * 100  + 5
     
    For value = 0  ==> 60,000,000 + ( 0 ) * 100 + 5  = 60,000,000 + 0 + 5 = 60,000,005
    [..]
    For value = 12345 ===> 60,000,000 + (12345) * 100 + 5  = 50,000,000 + 1,234,500 + 5 =  61,234,505
    [..]
    For value = 99999 ===> 60,000,000 + ( 99,999) * 100 + 5 = 60,000,000 + 9,999,900 + 5 = 69,999,905
     
    so something super simple in php :
     
    for ($i = 0; $i <= 99999; $i++) { $value = 60000000 + ($i*100) + 5; echo $value."\n"; } will output all those numbers.  so just use php.exe script.php >output.txt
    to output the console text to a text file you can then open and do whatever you want with it.
     
×