How do I change both For...Next statements to Do...Loop statements.


'declare variables
Dim term As Integer
Dim principal, rate, payment As Double

Try
'assign input to a variable
principal = Double.Parse(Me.uiPrincipalTextBox.Text)

'display the years in the heading
Me.uiPaymentLabel.Text = " 3 yrs 4 yrs 5 yrs" _
& ControlChars.NewLine

'calculate and display the monthly payments, using
'rates of 5% to 10% and terms of 3 to 5 years
For rate = 0.05 To 0.1 Step 0.01
'display the current rate
Me.uiPaymentLabel.Text = Me.uiPaymentLabel.Text & rate.ToString("P0") _
& " "
For term = 3 To 5
payment = -Financial.Pmt(rate / 12, term * 12, principal)
Me.uiPaymentLabel.Text = Me.uiPaymentLabel.Text _
& payment.ToString("N2") & " "
Next term
Me.uiPaymentLabel.Text = Me.uiPaymentLabel.Text & ControlChars.NewLine
Next rate


Any Help would be greatly appreciated.