(11C) Pricing Calculation

08112018, 06:33 AM
(This post was last modified: Yesterday 11:37 AM by Gamo.)
Post: #1




(11C) Pricing Calculation
Program to calculate pricing method.
Input two known variables from four variables to get answer for the two unknown variables. This program calculate solutions based on Markup for Cost and Price. For unknown Margin this program calculate Margin and Markup vise versa and independently using labels [D] or [E] : Markup <> Margin [A] Cost [B] Price [C] Markup [D] Margin // for when Markup is unknown [E] Markup // for when Margin is unknown Example: Set to f [USER] mode 1. Known Cost and Price look for Markup and Margin Cost 66.46 Price 105 66.46 [A] display 0 105 [B] display 0 [C] display 57.99 // Answer for Markup [C] display 0 // Store Markup [D] display 36.70 // Answer for Margin  2. Known Price and Markup look for Cost and Margin Price 150 Markup 150 150 [B] display 0 150 [C] display 0 [A] display 60 // Answer for Cost [D] display 0 > [D] display 60 // Answer for Margin  3. Known Cost and Margin look for Price and Markup Cost 33.75 Margin 55 33.75 [A] display 0 55 [D] display 0 > [E] display 122.22 // known margin for markup [C] display 0 // Markup displayed and Store Markup [B] display 75 // Answer for Price  4. Known Markup and like to know the Margin Markup 54 54 [E] display 0 [D] display 35.06 // Answer for Margin  Program: Pricing Calculation Code:
Gamo 

08112018, 12:28 PM
(This post was last modified: 08112018 05:35 PM by Dieter.)
Post: #2




RE: (11C) Pricing Calculation
(08112018 06:33 AM)Gamo Wrote: Program to calculate pricing method. It looks like you really like such programs. ;) There have been several discussions on programs for various calculators, including a version for the 11C. Just a few remarks regarding your program:
Your program uses a clear and unambiguous method for input and output. But this does not become clear from your examples, and it also is never explained. This leads to some strange key sequences in your examples: (08112018 06:33 AM)Gamo Wrote: 2. Known Price and Markup look for Cost and Margin This looks very unintuitive. Why should the user press [R/S] here? He doesn't have to do so anywhere else. But this cumbersome way of calculating the margin is not required at all: There is a simple basic idea which makes using the program easy and consistent:
This way example 1 can be solved as follows: 150 [B] => 0,00 150 [C] => 0,00 [A] => 60,00 150 [E] => 0,00 // Enter 150% markup... [D] => 60,00 // ...and convert it into a margin of 60% No [R/S] required, no exceptions to remember. Note: since the 150% markup has already been entered before, the 150 [E] step may even be omitted and 0 [D] directly returns the margin. Or take a look at example 2. It can be solved with the same logic: Cost 66,46 Price 105 66,46 [A] => 0,00 105 [B] => 0,00 [C] => 57,99 // Markup is 57,99% [E] => 0,00 // Enter this markup... [D] => 36,70 // ...and convert it into a margin of 36,70% Your program works better than your examples show it. ;) Dieter 

08112018, 01:38 PM
Post: #3




RE: (11C) Pricing Calculation
Thank You Dieter
Thanks so much for the corrections I have make changed from your suggestions and now work flawlessly. The program that I try to master the most is this Pricing Calculation. I was kind of disappointed that the HP12C didn't include this function and even the HP12C Platinum the update version still don't have this function. In my opinion financial calculator should have Pricing Calculation. On the HP 10bii+ with this it can calculate pricing method but cannot do calculations between only the Margin and Markup. I like to see if that possible to program so that it work just like the TVM function on the HP12C by using one key stroke for each variable then one key stroke for answer. example: 12 [n] display 12,00 7 [I] display 7,00 1000 [PV] display 1000,00 [FV] display 2252,19 Gamo 

08112018, 04:49 PM
(This post was last modified: 08112018 05:57 PM by Dieter.)
Post: #4




RE: (11C) Pricing Calculation
(08112018 01:38 PM)Gamo Wrote: I like to see if that possible to program so that it work just like the TVM function on the HP12C by using one key stroke for each variable then one key stroke for answer. This is only possible if there is a way to detect data input. The HP67/97 can do this with flag 3, on the HP41/42 it's flag 22/23 that can be checked. The WP34s also has some means to detect input. But otherwise there is no way to check if the user has entered data or not. So the program in an 11C, 12C or 15C cannot know if the value in X is a user input or the result of a previous calculation. If a key like [A] or [B] has been pressed the calculator doesn't know if the user has entered data (store it) or not (calculate it). So you have to do it differently. For instance by defining that a zero input means "calculate" and a positive (or negative) input means "store this as data input". This also means that none of the data must be zero. This method has been used in the 11C program in this earlier thread on pricing programs (cf. post #12). BTW the HP67 version in that thread uses flag 3 instead. I think the method in the program you posted is as close as you can get to a "single key" solution in an 11C: The user enters some data, presses [A], [B] or [C] and the program stores the input. A zero is returned (which also confirms the inputs has been processed). Since now a zero already is X you may simply press [A], [B] or [C] again to have the respective value calculated. Another method could be a "calculate" key that sets a flag which indicates that the next key press means "calulate this value" instead of "store this". For instance the [E] key could be used for this: [A] means "store cost" [E] [A] means "calculate cost" [C] means "store markup" [E] [C] means "calculate markup" But again: as long as the calculator hardware doesn't support it there is no way to have the program determine if the user has entered data or not, so there is no "single key solution" that behaves exactly like the 12C TVM solver. Dieter 

08122018, 08:20 AM
(This post was last modified: 08122018 08:37 AM by Gamo.)
Post: #5




RE: (11C) Pricing Calculation
Cool...so this program is closer to the one key input and one key output procedure.
This program is now perfect for use on 11C or 15C I'm very satisfy now. Gamo 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)