khubaib30 khubaib30
  • 12-01-2021
  • Computers and Technology
contestada

write a program to QBASIC to display the first 10 numbers of fibonacci series​

Respuesta :

tonb
tonb tonb
  • 12-01-2021

Answer:

FIB = 0

FNEXT = 1

FOR I=1 TO 10

 PRINT FIB

 TEMP = FNEXT

 FNEXT = FIB + FNEXT

 FIB = TEMP

NEXT I

Explanation:

The Fibonacci Sequence is: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89…

We're printing only the first 10 numbers.

Answer Link

Otras preguntas

A single unit of hereditary information
Which of the following best describes the sources a historian uses to support an argument
3c-2d=2 3c+4d=30 Solve each system of equations by using elimination
Simplify the following expression. 5(2x -3) + 4( x + 1)
Who coined the name for the United Nations? a. Joseph Stalin b. Harry Truman c. Winston Churchill d. Franklin d. Roosevelt
Some students attend school 180 of the 365 days in a year. About what part of the year do they attend school?
The muscles located in the leg that move the ankle and foot are divided into ________. A. Anterior, posterior, and lateral compartments B. Oblique, latera
what is 0.144 ÷0.96 =
Which of the following cities is located on the most densely populated island of Indonesia? A. Kuala Lumpur B. Jakarta C. Bangkok D. Manila
Which of the following devices imparts ownership in a corporation? A. Bond B. U.S. Treasury Bill C. Stock D. Savings account