any help on how i would combine these two loops into one do while loop?
thanks!
VB Code:
  1. If (num > 1) Then
  2.             Do While (num > 1)
  3.                 Do While (num Mod num1) = 0
  4.                     num2 = num \ num1
  5.                     If (num2 > 1) Then
  6.                         txt2 &= num1 & " * "
  7.                         num = num2
  8.                     Else
  9.                         txt2 &= num1
  10.                         num = 0
  11.                         Exit Do
  12.                     End If
  13.                 Loop
  14.                 If (num = 0) Then Exit Do
  15.                 num1 += 1
  16.             Loop
  17.             lblOutput.Text = "Prime factors of " & number & " are: " _
  18.             & txt1 & txt2
  19.         End If
  20.     End Sub