any help on how i would combine these two loops into one do while loop?
thanks!
VB Code:
If (num > 1) Then Do While (num > 1) Do While (num Mod num1) = 0 num2 = num \ num1 If (num2 > 1) Then txt2 &= num1 & " * " num = num2 Else txt2 &= num1 num = 0 Exit Do End If Loop If (num = 0) Then Exit Do num1 += 1 Loop lblOutput.Text = "Prime factors of " & number & " are: " _ & txt1 & txt2 End If End Sub


Reply With Quote
