VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Displays all factors of a given number

by Salvador "Doy" Relleta Jalayajay (3 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 17th July 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Displays all factors of a given number

Rate Displays all factors of a given number



List1.Clear
List2.Clear
a = CDbl(Text1.Text)
For b = 1 To a
  For c = 1 To a
  d = b * c
  If d = a Then
  List1.AddItem b
  List2.AddItem c
  End If
  Next c
Next b
End Sub

Download this snippet    Add to My Saved Code

Displays all factors of a given number Comments

No comments have been posted about Displays all factors of a given number. Why not be the first to post a comment about Displays all factors of a given number.

Post your comment

Subject:
Message:
0/1000 characters