# HP Forums

Full Version: (11C) (15C) Tip Calculation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is a simple program for tip calculation that took the idea from HP 12C Platinum vertical mode calculator app with Tip functions.
LBL A for Bill Amount
LBL B for Tip%
LBL C for Split (if only yourself enter 1)
LBL D answer for Tip per Person
LBL E answer for Total per Person

Code:
``` LBL A [Bill] STO 1 RTN LBL B [Tip%] STO 2 RTN LBL C [Split] STO 3  RTN LBL D [>Tip] RCL 1 RCL 2 % RCL 3 / RTN LBL E [>Total] RCL 1 RCL 2 % + RCL 3 /  RTN```

Total bill is \$90.45 with 15% tip and 2 person

Example: 90.45 f A [Bill], 15 f B [Tip%], 2 f C [Split]

Answer: f D result 6.78 per person [Tip], f E result 52.01 per person[Total]

Quick Change: If you decided to lower the [Tip%] to 10% just press 10 f B and result for [Tip per person] and [Total per person] get the update result.

Now press f D result 4.52 per person [Tip], f E result 49.75 per person [Total]

Gamo
(10-07-2017 06:45 AM)Gamo Wrote: [ -> ]This is a simple program for tip calculation that took the idea from HP 12C Platinum vertical mode calculator app with Tip functions.
LBL A for Bill Amount
LBL B for Tip%
LBL C for Split (if only yourself enter 1)
LBL D answer for Tip per Person
LBL C answer for Total per Person

Quote:LBL A [Bill]
STO 1
RTN
LBL B [Tip%]
STO 2
RTN
LBL C [Split]
STO 3
RTN
LBL D [>Tip]
RCL 1
ENTER
RCL 2
%
RCL 3
/
RTN
LBL E [>Total]
RCL 1
ENTER
RCL 2
%
+
RCL 3
/
RTN

Total bill is \$90.45 with 15% tip and 2 person

Example: 90.45 f A [Bill], 15 f B [Tip%], 2 f C [Split]

Answer: f D result 6.78 per person [Tip], f E result 52.01 per person[Total]

Quick Chagne: If you decided to lower the [Tip%] to 10% just press 10 f B and result for [Tip per person] and [Total per person] get the update result.

Now press f D result 4.52 per person [Tip], f E result 49.75 per person [Total]

Gamo
Just look at the label Instructions, for the last corresponds LBL E instaed LBL C. Pedro
Pedro Thank You that was typo.
I'm making change to LBL E

Gamo
(10-07-2017 02:10 PM)Gamo Wrote: [ -> ]Pedro Thank You that was typo.
I'm making change to LBL E

You also can (and should) remove the two ENTERs at LBL D and E.
BTW, this program will also work on other HPs with label keys, such as the HP67 and 97.

Dieter
Dieter Thank You
I update the program now no ENTER

On the HP 67 and 97 even better when using Labels like this program because don't have to press f then LBL just go straight to each labels that very convenience.

Gamo
(10-08-2017 09:04 AM)Gamo Wrote: [ -> ]I update the program now no ENTER

Fine. Please also consider your other program for calculators without label keys.

(10-08-2017 09:04 AM)Gamo Wrote: [ -> ]On the HP 67 and 97 even better when using Labels like this program because don't have to press f then LBL just go straight to each labels that very convenience.

Switch to User mode and it's the same on the 11C and 15C. ;-)

P.S.: I'm a big fan of compact code, so here's another version.
Works on most calculators with R↑ key and does not require any registers.

Code:
```R↓ % + LastX R↑ / X<>Y LastX /```

90,45 [ENTER] 15 [ENTER] 2 [R/S]
=> 52,01 [X<>Y] 6,78

What? No R↑ key? Replace R↑ with 3x R↓.

Dieter
Dieter Thank You

That shorter program is very compact one.
For this program I try to make the same input steps of the Tip Calculator on the HP 12C Platinum Vertical Mode.
On HP 12CP user key in 3 variables and get the answer for the other 2 variables.

Thank You

Gamo
(10-09-2017 01:24 AM)Gamo Wrote: [ -> ]That shorter program is very compact one.

On the 41/42 it can be even shorter:

Code:
```R↓ % ST+ Y R↑ ST/ Z /```

90,45 [ENTER] 15 [ENTER] 2 [R/S]
=> 6,78 [X<>Y] 52,01

On the 42s you even see both results at the same time.

(10-09-2017 01:24 AM)Gamo Wrote: [ -> ]For this program I try to make the same input steps of the Tip Calculator on the HP 12C Platinum Vertical Mode.
On HP 12CP user key in 3 variables and get the answer for the other 2 variables.

OK, so post your new version here.

Dieter
For HP 67 longer program and shorter output procedure ==>

Code:
```R↓ % + LastX R↑ / X<>Y LastX / R/S X<>Y```

So ==> Input: 90.45 [ENTER] 15 [ENTER] 2
Output: [R/S] 52.01 [R/S] 6.78
Pedro
Reference URL's
• HP Forums: http://www.hpmuseum.org/forum/index.php
• :