programming ( qbasic)

posted by mark

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

  1. Steve

    google is your friend. Use it.

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

  2. Helpful Dude

    ^
    |
    What that guy said.

  3. mark

    thanks steve sir

Respond to this Question

First Name

Your Answer

Similar Questions

  1. 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 error …
  2. QBASIC, Computers

    The following is a list of salaries of the six employees in a certain company: Name Salary T. Angel $43,000 F. Smith $31,000 K. Johnston $22,000 P. Miner $18,000 C. Altman $27,000 A. Lu $19,000 Read a single dimension array for name …
  3. QBASIC, Computers question 2

    Why do I keep getting a Type Mismatch error on this line?
  4. reading

    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 …
  5. programming ( qbasic)

    Write a program in qbasic to print the user entered word in reverse order using FUNCTION...END FUNCTION
  6. Reading

    41. Choosing the Resolution for Your Photos Resolution Purpose L (Large) 2592x1944 pixels Print larger that A 4 size prints (8.3 x 11.7 in.) Print larger than letter size prints (8.5 x 11 in.) M1 (Medium 1) 2048 x 1536 Print up to …
  7. Reading

    41. Choosing the Resolution for Your Photos Resolution Purpose L (Large) 2592x1944 pixels Print larger that A 4 size prints (8.3 x 11.7 in.) Print larger than letter size prints (8.5 x 11 in.) M1 (Medium 1) 2048 x 1536 Print up to …
  8. English

    41. Choosing the Resolution for Your Photos Resolution Purpose L (Large) 2592x1944 pixels Print larger that A 4 size prints (8.3 x 11.7 in.) Print larger than letter size prints (8.5 x 11 in.) M1 (Medium 1) 2048 x 1536 Print up to …
  9. 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?
  10. 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 a; …

More Similar Questions