Somehow related to HP Calculators
|
01-05-2022, 02:00 PM
Post: #12
|
|||
|
|||
RE: Somehow related to HP Calculators
To address the original question, may I suggest the following:
Code:
You enter the starting salary (10000) and press A. You enter the bonus amount (500) and press B. Press C to initialize. Press D, get year (0). Press R/S, get salary at end of year 0. Press R/S, get salary plus total bonuses paid. Press D again, get year (1). Press R/S, get salary at end of year 1. Press R/S, get salary plus total bonuses paid. Repeat the press D step for each subsequent year. The results I get are: 10000 A "10000.00" 500 B "500.00" C "0.00" D "0.00" R/S "10500.00" R/S "10500.00" D "1.00" R/S "10500.00" R/S "11000.00" D "2.00" R/S "11000.00" R/S "12000.00" D "3.00" R/S "11000.00" R/S "13000.00" D "4.00" R/S "11500.00" R/S "14500.00" D "5.00" R/S "11500.00" R/S "16000.00" etc Register 1 stores salary. Register 2 stores the bonus amount. Register 3 is a counter for years employed. Register 4 accumulates the total bonuses paid. It isn't quite what was asked for. The final figure from the LBL D routine should include each years salary, not just one year's worth. That'd be fixed by moving the STO + 4 from line 027 to just after the + currently on line 031. I accept that this doesn't account for Italian or German taxes and that Excel is probably an easier approach these days. However, had the problem been considered in the HP-65's day, Excel wouldn't have been around. The above code plugs directly into my HP-65 microcode emulator (can be run directly on the website, click the digit display then Program and the input box then paste). It should run in other emulators too or on the real thing. Whilst I'm in Australia - slightly south of Teenix - and not looking for a job in Italy, I think I've met the selection criteria :-) All the best, - Greg from sydneysmith.com |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)