E-Code

Projectile from a height (dialog, m or ft) — a TI-89 Titanium program

By E-Code · updated

PROJ89 is a TI-89 BASIC program for the TI-89 Titanium. A dialog takes launch speed, angle in degrees and launch height, and a drop-down picks meters or feet (g = 9.80665 or 32.174); shows the time of flight, range, peak height and impact speed.

What it asks for and what it shows

It asks for 3 values at its prompts, after you pick option 1 from its menu. In the example below it shows TIME S, RANGE, PEAK, IMPACT V.

Example run

One of its oracle test cases: “20 m/s at 30° off a 15 m ledge”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 1
Input 120
Input 230
Input 315
The screen shows
TIME S=3.044307479
RANGE=52.72895227
PEAK=20.09858106
IMPACT V=26.34766593

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 21 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium programs