how to create console application to calculate 23 numbers of fibonacci?
This is the script I had done but facing an issue:
Please help...
This is the script I had done but facing an issue:
VB.NET:
Module Module1
Sub Main()
'area to declare all integer
String inputstring;
String outputstring;
Int(firstnumber)
Int(secondnumber)
Int(current)
Int(CounterCreationData)
Int(lastnumber)
'ask user to enter first fibonacci number which is 1
Input String = Console.WriteLine ("Please key in the first Fibonacci number: ")
firstnumber = Integer.parseInt(InputString)
'ask user to enter second fibonacci number which is 1
InputString = Console.WriteLine("Please key in the second Fibonacci number: ")
secondnumber = Integer.parseInt(InputString)
Console.WriteLine = "The first two Fibonacci numbers are: " 'this will show the first result
+ firstnumber + "and" + "secondnumber
If lastnumber ==1
current = firstnumber
Else if
lastnumber ==2
current = secondnumber
Else '1+2=3
Counter = 3
End Sub
End Module
Please help...
Last edited by a moderator: