87
Chapter 8
Application Examples
Programming Examples
The following examples demonstrate the basic use of programming
commands including print, input and flow controls. Use the examples for your
programming reference.
Some like it hot (Celsius-Fahrenheit conversion)
This is a program to convert temperatures from Celsius to Fahrenheit and
vice versa.
1. Press b 2 1 0 to open a
window for creating a NEW program.
2. Type TEMP for the program title then press
e.
•A NEW program called ‘TEMP’ will be
created.
3. Enter the program as follows.
• See ‘*’ below for further explanation.
Program code Key operations
Label START i 6 @ a START ;
e
Print”(1) C TO F i 1 ( 1 ) @ a
s C s TO s F ; e
Print”(2) F TO C i 1 ( 2 ) @ a
s F s TO s C ; e
Input T i 2 ; T e
TEMP :NORMAL
PROGRAM?
* Here, the program prompts you
to choose which type of
conversion you wish to perform.
Press 1 for “C TO F” and
2 for “F TO C”.