The Maths Thread

They are. I'm a programmer and would just have looped from 1 up to a result where the result meets the criteria being the leftmost number of the result equals 9 and the rightmost number of the seed is 9. A mix of mathematics and string parsing.
Crystal clear. What is string parsing? No explanation needed, will be right over my head!
 
Crystal clear. What is string parsing? No explanation needed, will be right over my head!
It's lazy maths in this case. It's taking the number and treating it as a word, then taking part of that word such as one letter (or digit in this case) and doing something with it. In Excel, if you use it, SubString is a string parsing function.
 
It's lazy maths in this case. It's taking the number and treating it as a word, then taking part of that word such as one letter (or digit in this case) and doing something with it. In Excel, if you use it, SubString is a string parsing function.
Amazingly, I understood that. I am/was a linguist (no jokes at the back, please) so parsing is familiar.
 
Amazingly, I understood that. I am/was a linguist (no jokes at the back, please) so parsing is familiar.


sub CalculateNumber

for specialnumber = 19 to 1000000 step 10

result = specialnumber*4

midchars_a = left(specialnumber, len(specialnumber)-1)
midchars_b = right(result, len(result)-1)

if left(result,1)=9 and midchars_a=midchars_b then
msgbox specialnumber
end if

next

end sub
 
Get kids to put 99999999.9 into their calculator and divide by 3 to get 33333333.3. Divide by 3 again and get 11111111.1. Divide once more and you get a random number but divide that by 3 and you get 12345678.9
They think its magic.
(I hope l got the right number of digits each time. I am going sken eyed trying to count them.
L


.
 

Don't have an account? Register now and see fewer ads!

SIGN UP
Back
Top
  AdBlock Detected
Bluemoon relies on advertising to pay our hosting fees. Please support the site by disabling your ad blocking software to help keep the forum sustainable. Thanks.