English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For my Programing class we need to, "Write a program that will generate the first 22 numbers in the Fibonacci sequence and Display them in a label.", I am completely stumped could you help me?

2006-10-01 13:56:53 · 1 answers · asked by Paul M 1 in Computers & Internet Programming & Design

1 answers

use for loop begins with 3 and ends with 22
use an array

a[1]=1
a[2]=1

use in for loop
a[n]=a[n-1]+a[n-2]

2006-10-01 14:47:52 · answer #1 · answered by iyiogrenci 6 · 0 0

fedest.com, questions and answers