I'm not at all sure where to put this question.
It's been a long tine since I messed with basic, and I'm not a programmer of any kind.
I got interested in a method for calculating the Golden mean, and I'm hoping some kind soul will point me in the right direction.
I'd like to write a Qbasic program(I don't have any other languages available anyway) that:
Inputs two numbers (This I can handle)
Adds them together(Check)
Adds that sum to the previous number (No problem)
(if the two numbers are 5 and two, the third is 7 (5 + 2)+5 =12)
I want to continue in that fashion until I have twenty numbers, then divide the 20th by the nineteenth.
I haven't figured out how to handle the "previous number", and any hints will be appreciated.

9 Years
Discussion Span
Last Post by vb5prgrmr

Sounds like you will need to keep track of those previous numbers with some variables and its been a long time since I had to do anything to do with QBasic but an array would serve you nicely. Then you would need another variable to keep track of how many numbers have been entered.

Good Luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.