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.
TIA.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.