473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Could any one help me? (Fibonacci)

Could any one help me? (Fibonacci)

Computing a Fibonacci sequence, with a numericupdown control and display the result on the listview control. This is on visual studio 2005 (VB).

Please help….
Oct 17 '06 #1
4 2716
Killer42
8,435 Expert 8TB
Could any one help me? (Fibonacci)

Computing a Fibonacci sequence, with a numericupdown control and display the result on the listview control. This is on visual studio 2005 (VB).

Please help….
Try this: Fibonacci number program - Wikipedia, the free encyclopedia - see item 16 on the list. (I haven't tried it, just found it.)
Oct 24 '06 #2
albertw
267 100+
hi

i tried something:

declare an array first
Dim longFibonacci(50) as Long 'or whatever number

then have a counter called 'Counter' run on clicking your up/down button

call a sub

Public Sub Fibonacci(Counter)
select case Counter
case = 0
Answer =0
case = 1
Answer = 1
case else
Answer = longFibonacci(i-2) + longFibonacci(i-1)
End Select
longFibonacci(Counter) = Answer
End Sub
Oct 25 '06 #3
albertw
267 100+
hi again
seems Long is not long enough :(
make it
Dim dblFibonacci(50) as Double
Oct 26 '06 #4
Killer42
8,435 Expert 8TB
hi again
seems Long is not long enough :(
make it
Dim dblFibonacci(50) as Double
Not long enough? How large a result are we talking about? Perhaps the problem is simply in the type of any intermediate results.
Oct 26 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

28
by: dleecurt | last post by:
Hello, I have a small problem, I am trying to write a program that will calculate the Fibonacci number series, and I have the code complete with one problem. I used a long in to store the numbers,...
0
by: Alex Vinokur | last post by:
An algorithm which computes very long Fibonacci numbers http://groups.google.com/groups?selm=bnni5p%2412i47o%241%40ID-79865.news.uni-berlin.de was used as a performance testsuite to compare speed...
5
by: Lance | last post by:
What is the correct STL libraries to implement in order to have a Fibonacci Heap created? I am creating an algorithm which would use a Fibonacci Heap. Thanks, Lance
5
by: Niks | last post by:
Can anybody explain me what is a "Fibonacci search"? even an URL will do. Thanks for reading.
4
by: YS Sze | last post by:
If you know the exact longitude and latitude for a specific location, would anyone think it'd make any sense to find out if this set of location numbers is really part of the Fibonacci series or...
12
by: CII | last post by:
Hi everybody. I've been reading posts a year old about the fibonacci series right on this newsgroup, and while it's not directly games related, I'll share my own notes as well. On another...
14
by: felixnielsen | last post by:
Im actually kinda embarassed to ask this question... @code start #include <iostream> int main() { unsigned long long a = 1; unsigned long long b = 1; for (int i = 0; i < 45; i++) { a += b;...
3
by: greek | last post by:
Hi! I hav to generate fibonaaci series using recursion: 0,1,1,2,3,5,8,18,21... whr fibonacci(0)=0 fibonacci(1)=1 fibonacci(n)=fibonacci(n-1)+fibonacci(n-2) ive witten the code but having 2...
3
by: veeru | last post by:
Hi All, Can anyone tell about how to create a FIBONACCI series in VB.Net and C# Thanks in Advance, Veeru
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.