Chapter 8: Application Examples; Programming Examples; Some Like It Hot (Celsius-Fahrenheit Conversion) - Sharp EL-5230 Operation Manual

Programmable scientific calculator
Table of Contents

Advertisement

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.
Press b 2 1 0 to open a
1.
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
Label START
Print"(1) C TO F
Print"(2) F TO C
Input T
* 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".
TEMP
PROGRAM?
Key operations
i 6 @ a START ;
e
i 1 ( 1 ) @ a
s C s TO s F ; e
i 1 ( 2 ) @ a
s F s TO s C ; e
i 2 ; T e
:NORMAL
87

Advertisement

Table of Contents
loading

This manual is also suitable for:

El-5250

Table of Contents