Post Reply 
(12C) Series of Numbers using [CFj] for [ %T]
06-03-2018, 09:54 AM (This post was last modified: 06-03-2018 10:01 AM by Gamo.)
Post: #1
(12C) Series of Numbers using [CFj] for [ %T]
HP-12C Owner's handbook did not show the other useful features on the function of [CFj] that can be use to store a series of numbers for the use of [%T]

This program was from the HP-38C Owner's Handbook on page 112

Program to calculate the percentage that each number in a series of numbers is of the total sum of the numbers.

Use [CFo] and [CFj] keys to input numbers rather than [STO]

This program consist of two main parts:

1. Input the series of numbers and find their sum.
2. Calcuate the [%T] for each number of that sum.

And use some sort of flag to tell the calculator that user have finished entering the series of numbers by the use of [X=0]
When user input zero it will branch to the second part of the program.

Program:
Code:

01 [CFo]
02 R/S
03 X=0
04 GTO 08
05 [CFj]
06  +
07 GTO 02
08 CLx         // First part of program 
--------------------------------------------------------------------------
09 RCL [n]      // Second part of program
10 X=0
11 GTO 00
12 CLx
13 RCL [CFj]
14 R/S
15 [%T]
16 R/S
17 CLx
18 GTO 09

Example:
Find the percentage that each of the following numbers represent of the total sum of the numbers: 54, 14, 83, 144 and 38

0 R/S > 0 // Initialize [CFo] with zero and next key in the numbers

54 R/S > 54
14 R/S > 68
83 R/S > 151
144 R/S > 295
38 R/S > 333 // Sum of all numbers entered.

0 R/S > 38 // Last number you keyed in
R/S > 11.41 // % of total.

R/S > 144 // Fourth number you keyed in.
R/S > 43.24 // % of total.

R/S > 83 // Third number.
R/S > 24.92 // % of total.

R/S > 14 // Second number.
R/S > 4.20 // % of total.

R/S > 54 // First number.
R/S > 16.22 // % of total.

To recall the total press [X<>Y]

Gamo

This program can be modify by the use of "Bubble Sort" routine posted in this forum so that the series of numbers will be in order from highest number to lowest number. This will be much easier to see the percent of total from hight to low.
I'm still in progress to do this, anyone here got it feel free to share here.

Thank You
Find all posts by this user
Quote this message in a reply
Post Reply 




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