The document contains code for 3 click event procedures that generate Fibonacci series. The FOR_Click procedure uses a For loop, DOWHILE_Click uses a Do While loop, and DOUNTILL_Click uses a Do Until loop to iterate from 1 to the number of terms input by the user. Each loop calculates the next term in the Fibonacci series and prints it to the Picture box.
The document contains code for 3 click event procedures that generate Fibonacci series. The FOR_Click procedure uses a For loop, DOWHILE_Click uses a Do While loop, and DOUNTILL_Click uses a Do Until loop to iterate from 1 to the number of terms input by the user. Each loop calculates the next term in the Fibonacci series and prints it to the Picture box.
The document contains code for 3 click event procedures that generate Fibonacci series. The FOR_Click procedure uses a For loop, DOWHILE_Click uses a Do While loop, and DOUNTILL_Click uses a Do Until loop to iterate from 1 to the number of terms input by the user. Each loop calculates the next term in the Fibonacci series and prints it to the Picture box.
The document contains code for 3 click event procedures that generate Fibonacci series. The FOR_Click procedure uses a For loop, DOWHILE_Click uses a Do While loop, and DOUNTILL_Click uses a Do Until loop to iterate from 1 to the number of terms input by the user. Each loop calculates the next term in the Fibonacci series and prints it to the Picture box.
Picture1.Cls series = InputBox("Enter number of series") a=1 For x = 1 To series If x > 2 Then c=a+b a=b b=c Picture1.Print c & Space(2); Else Picture1.Print a & Space(2); b=a End If Next x End Sub
Private Sub DOWHILE_Click()
Dim a, b, c, series As Integer Picture1.Cls series = InputBox("Enter number of series") a=1 Do While x < series If x > 1 Then c=a+b a=b b=c Picture1.Print c & Space(2); Else Picture1.Print a & Space(2); b=a End If x=x+1 Loop End Sub
Private Sub DOUNTILL_Click()
Dim a, b, c, series As Integer Picture1.Cls series = InputBox("Enter number of series") a=1 Do Until x > series - 1 If x > 1 Then c=a+b a=b b=c Picture1.Print c & Space(2); Else Picture1.Print a & Space(2); b=a End If x=x+1 Loop End Sub