# programming ( qbasic)

rem prints fibonacci series
cls
a=2
b=1
for p = 1 to 5
print a
print b
a=a + b
b=b + a
next p
end

I have done this program. How do you do it using modular programming.. FUNCTION...END FUNCTION???? I tried but it didn't work

http://www.schoolfreeware.com/QBasic_Tutorial_38_-_Making_A_Function_-_QB64.html

posted by Steve
2. ^
|
What that guy said.

3. thanks steve sir

posted by mark

## Similar Questions

1. ### computer programming

write a program to print fibonaaci series like 2,1,3,4,7,11,18 up to 10th term using function...end function I did it using SUB..end sub in this way : declare sub series cls call series end sub series a=2 b=1 for p =1 to 5 print
2. ### computer

A-Asking the user to pick a number between 1 and 20 and having the computer pick a number between 1 and 20 and telling the user if they won or lost B- For finding the logic error in the program C- For finding and fixing the logic
3. ### programming ( qbasic)

i was given this program by my teacher. it converts decimal number to binary number.. Why is that FIX kept in front of (n/2) ...6th line of the program. why is that FIX written and why? i didn't get it CLS INPUT â€œENTER A
4. ### programming ( qbasic)

Write a program in qbasic to print the user entered word in reverse order using FUNCTION...END FUNCTION
5. ### QBASIC, Computers question 2

Why do I keep getting a Type Mismatch error on this line? Also, when i click "View" to view my output screen its blank, so nothing is printing.... can so please help me resolve this? PRINT USING D\$; NAM\$; VehicleType\$; DaysHeld;

46. Choosing the Resolution for Your Photos Resolution Purpose L (Large) Print larger than A4 size prints 2592 x 1944 pixels (8 .3 x 11 .7 in.) Print larger than letter size prints (8 .5 x 11 in.) M1 (Medium 1) Print up to A4 size