Advertisement
m4hd1r

HALA RADIFE?

Aug 28th, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim a As Long
  2. Dim b As Long
  3. Dim c As Long
  4. Dim n As Long
  5. Dim t1 As String
  6. Dim t2 As String
  7. Dim g As String
  8. Dim r As Integer
  9.  
  10.  
  11. Private Sub Command1_Click()
  12.  
  13. r = 1
  14. t1 = TimeValue(Now)
  15.  n = Val(Text1)
  16.  
  17. For a = 2 To n / 2
  18. If n / a = n \ a Then
  19.  
  20.  
  21.        
  22.         For b = 2 To n / a
  23.         If n / b = n \ b Then
  24.        
  25.        
  26.                
  27.                
  28.                 For c = 2 To n / (b * a)
  29.                 If n / c = n \ c Then
  30.                
  31.                
  32. '---------------------------------------------------------------'
  33. 1  If a * b * c = n Then                                        '
  34. g = g & Str(r) & vbTab & a & vbTab & b & vbTab & c & vbNewLine  '
  35. r = r + 1                                                       '
  36.   End If                                                       '
  37. '---------------------------------------------------------------'
  38.                
  39.                
  40.                 End If
  41.                 Next c
  42.                
  43.        
  44.         End If
  45.         Next b
  46.        
  47.  
  48. End If
  49. Next a
  50. Text2 = g
  51.  
  52. t2 = TimeValue(Now)
  53.  
  54.     Label1 = t1
  55.     label4 = t2
  56.  
  57.  
  58.  
  59. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement