Sample Programs


A few sample programs that illustrate various functions.  Also, screenshots have been included to illustrate the end result of select programs.

Program Titles

Area of a Rectangle

Area of a Triangle

Related Pages

Programming Main Page

Basic Programming Functions

Prompt/Input

Links

Home

Programming Main Page

Area of a Rectangle

Prompts for two values, solves for the area, displays the result.  The empty display tag gives a blank line in between the value prompts and the answer.

---------------

ClrHome

Input "Side 1? ",X

Input "Side 2? ",Y

X*Y→Z

Disp " "

Disp "Area=",Z

----------------

Area of a Triangle

Prompts for two values, finds the area of the triangle, and displays the answer.

----------------

ClrHome

Disp "Base?"

Prompt X

Disp "Height?"

Prompt Y

.5*X*Y→Z

Disp "Area=",Z

----------------