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

Home > Numbers
A periodical fraction (Posted on 2014-07-11) Difficulty: 3 of 5
GO/IN=.FIXFIXFIX...

Find the only existing solution.

See The Solution Submitted by Ady TZIDON    
Rating: 1.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 3
DefDbl A-Z
Dim crlf$, used(9)


Private Sub Form_Load()
 ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 DoEvents
 
 For g = 1 To 9
   used(g) = 1
 For i = 1 To 9
   If used(i) = 0 Then
     used(i) = 1
 For o = 0 To 9
   If used(o) = 0 Then
     used(o) = 1
 For f = 0 To 9
   If used(f) = 0 Then
     used(f) = 1
 For x = 0 To 9
   If used(x) = 0 Then
     used(x) = 1
 For n = 0 To 9
   If used(n) = 0 Then
     used(n) = 1
     
     goval = 10 * g + o
     inval = 10 * i + n
     fixval = 100 * f + 10 * i + x
     If fixval * inval = 999 * goval Then
      Text1.Text = Text1.Text & Str(goval) & "/" & inval & " = ." & fixval & fixval & fixval & "..." & crlf
     End If
     
     used(n) = 0
   End If
 Next
     used(x) = 0
   End If
 Next
     used(f) = 0
   End If
 Next
     used(o) = 0
   End If
 Next
     used(i) = 0
   End If
 Next
     used(g) = 0
 Next
 
 
 
 Text1.Text = Text1.Text & crlf & "done"
End Sub

finds

 16/37 = .432432432...


  Posted by Charlie on 2014-07-11 13:38:40
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information