Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Babbage-problem/VBA/babbage-problem.vba
Normal file
13
Task/Babbage-problem/VBA/babbage-problem.vba
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Sub Baggage_Problem()
|
||||
Dim i As Long
|
||||
|
||||
'We can start at the square root of 269696
|
||||
i = 520
|
||||
'269696 is a multiple of 4, 520 too
|
||||
'so we can increment i by 4
|
||||
Do While ((i * i) Mod 1000000) <> 269696
|
||||
i = i + 4 'Increment by 4
|
||||
Loop
|
||||
Debug.Print "The smallest positive integer whose square ends in the digits 269 696 is : " & i & vbCrLf & _
|
||||
"Its square is : " & i * i
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue