GIF2.1
About the author:
My name is Luke Miller and I am 17 and a senior in high school. I am also a Radio
Operator/Maintainer in the the U.S. Army. My e-mail address is lucas.miller@mailcity.com
About the program:
I was bored one night sitting in the back seat of my friends car while he and another friend
were cruising the town looking for women. Being that I already have a girlfriend I let my mind
wander. As I was thinking, I was messing with my TI-81 when I remembered the Greatest Integer
Function. For some odd reason I like messing with integers and accumulators and started writing
the first version of the program. After about 45 minutes i was up to version 2.1 and decided to
quit there. I am currently working on version 3.0.
Synopsis:
This program takes the function f(x)=Int(x+.5) to find the greatest integer
of a real number. For example: the greatest integer of the number 3.1416,
run that through the function and it comes out as 3. The way it works is
3.1416 + .5 is only 3.6416. Its still under less than 4 making 3 as the
greatest integer possible. The Int command in the equation is an instruction
to only take the integer of the number and discard the rest.
How to use the program:
First of all, execute the program. Next it will say something to the effect of "Greatest
Integer Function", press enter to continue. Then it will describe what the Greatest Integer
Function is and show the actual function. Press enter to continue. After that it will
prompt the user for a Real Number and display the output. Press enter to continue. Finally
it will prompt the user to run it again or exit the program.
Special Notation:
\->\ is the store key.
# shows spaces in the display formatting purposes.
Amount of memory:
272 Bytes
Program code:
Prgm:GIF2.1
:ClrHome
:Disp "GREATEST INTEGER####FUNCTION"
:Disp "###VERSION 2.1"
:Pause
:ClrHome
:Disp "THIS IS THE#####GREATEST INTEGERFUNCTION \->\######F(X)=Int(X+.5)"
:Pause
:Lbl 1
:ClrHome
:Disp "PLEASE ENTER A##REAL NUMBER."
:Input G
:Int (G+.5)\->\I
:ClrHome
:Disp "THE GREATEST####INTEGER OF,"
:Disp G
:Disp "IS,"
:Disp I
:Pause
:ClrHome
:Disp "RERUN?"
:Disp "YES=1"
:Disp "ANYOTHER=EXIT"
:Input O
:If O=1
:Goto 1
:ClrHome
:End