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

what is the value of root 12+root 12+root12.... ...............to infinite
Which one of the following passages best suggests an indirect cause?A. Because the cold front arrived, it snowed.B. If you mix pleasure and business, business s
What is the average of the integers from 25 to 41? 27, 33, 36, 66 ?
Ralph is 3 times as old as Sara. In 6 years, Ralph will be only twice as old as Sara will be then. Find Ralph's age now.
Given: m = (y2 - y1)/x2 - x1), y = mx + b, and the points (-2, 2) and (2, 4). Find the y-intercept. Write the equation of the line in slope-intercept form
The sum of the digits of a two-digit number is 9. If the digits are reversed, the new number is 27 less than the original. Find the original number.
what is "puppy" in Spanish?
The two points (-2,4) and (4,2) are the endpoints of the diameter of a circle. What is the equation of this circle in standard form?
I’m thinking of two numbers. Their greatest common factor is 6. Their least common multiple is 36. One of the numbers is 12. What is the other number?
The domain of F(x)=log[b]x is the set of all real numbers. True or false?