HP 48gII Advanced User's Reference Manual page 114

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

Program:
»
flags STOF
» 0 MENU
»
`OPIE K
Checksum: # 16631d
Bytes:
737
Example: The inventory at Fruit of the Vroom, a drive-in fruit stand, includes 983 oranges, 416 apples, and 85
bananas. Draw a pie chart to show each fruit's percentage of total inventory.
J %PIE%
Clear the current statistics data. (The prompt is removed
from the display.) Key in the new data and draw the pie
chart.
CLEAR
983 %SLICE%
416 %SLICE%
85 %SLICE%
%DRAW%
Press − to return to the stack display.
2-36 RPL Programming Examples
5 <
THEN
(3,2) +
END
END
prcnts n GET
1 RND
STR "%" +
1 GROB
GOR DUP PICT STO
LCD
NEXT
{ } PVIEW
»
Comments:
From 4.4 to 5 radians, offsets
the label 3 units right and 2
units up.
Ends the CASE structure.
Gets the nth value from the
percentage matrix, rounds it to
one decimal place, and converts
it to a string with "%"
appended.
Converts the string to a
graphics object.
Adds the label to the plot and
stores the new plot.
Displays the updated plot.
Ends the loop structure.
Displays the finished plot.
Restores the original flag status.
Restores the previous menu.
(You must first press − to
clear the plot.)
Stores the program in PIE.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents