Write a program in QBASIC to print the sum of the first 10 Fibonacci numbers.
Answers
Answered by
4
Answer:
here is the program
CLS
INPUT "what should be the first number in the seris"; x
INPUT "how many numbers do you want to print"; y
y = y - 2
a = x
b = x
PRINT a; b;
FOR i = 1 TO y
c = a + b
PRINT c;
a = b
b = c
NEXT i
END
Similar questions
Social Sciences,
2 days ago
History,
2 days ago
English,
2 days ago
Math,
4 days ago
Math,
4 days ago
Social Sciences,
8 months ago
Math,
8 months ago