All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Funny way to divide by seven (Posted on 2018-01-12)
"This special big number of mine allows me to get a correct answer of dividing it by 7 by simply erasing its second digit..." - declared Danny.
After a minute or two his father, W.G. quipped: "I know what digit was erased!"

Do you?

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer finding of numbers that can be divided that way | Comment 1 of 3
105
1050
10500
105000
1050000

so the removed digit is zero.

from

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For m = 10 To 1000000
p = 7 * m
ms\$ = LTrim(Str(m))
ps\$ = LTrim(Str(p))
If Len(ps) > Len(ms) Then
If Left(ms, 1) = Left(ps, 1) And Mid(ms, 2) = Mid(ps, 3) Then
Text1.Text = Text1.Text & ps & crlf
End If
End If
DoEvents
Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

 Posted by Charlie on 2018-01-12 19:33:39

 Search: Search body:
Forums (4)