EasyManuals Logo
Home>Texas Instruments>Calculator>TI Programmable 57

Texas Instruments TI Programmable 57 User Manual

Texas Instruments TI Programmable 57
94 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #63 background imageLoading...
Page #63 background image
FACTORIAL!
LOOPS
WITH
(24)
Ga
Gro)
n
An
idea
that
crops
up
often
in
studies
of
probability
and
statistics
is
what's
called
the
factorial
of
a
number.
The
factorial
of
a
number
is
indicated
with
an
exclamation
point
"|".
So,
"17
factorial”
is
written
171.
If
you've
ever
wondered
how
many
ways
17
people
could
arrange
themselves
in
17
chairs
the
answer
if
171.
The
factorial
of
any
number,
say
5,
is
calculated
by
multiplying
the
number
“out"’
as
follows:
§§=
5
x4x%3x%2%
1
The
factorial
of
any
number,
N,
is
equal
to
Ni.
=
N
x-(N=1).x(N-2)......
x1.
(The
number
0!
is
defined
to
be
1.)
DESTINATION
Write
a
program
that
allows
you
to
enter
a
number
(say
17),
press
RAI,
and
have
its
factorial
calculated
and
displayed.
PLANNING
THE
RouTE
This
example
is
a
“natural"’
for
use
of
the
(nd)
HM
67)
n
key
sequence
to
generate
the
numbers
17,
16,
15,...3,
2,
lin
memory
0.
We'll
enter
our
number,
load
it
in
memory
zero,
and
put
in
a
label
(Label
1)
right
after
that
point.
Then,
we'll
recall
memory
zero,
hit
the
multiply
key
and
then
enter
the
(x4)
Ml
G70)
1
key
sequence.
You
can
visualize
the
loop
something
like
this:
Recall
number
in
memory
0
Decrease
the
quantity
in
memory
0
by
!
If
the
first
number
placed
in
memory
0
is
17,
then
the
first
time
around
the
loop
would
produce
17
(X],
and
the
quantity
in
memory
0
would
be
re-
duced
to
16.
After
the
next
loop
you
would
have
1730.16
GO,
and
15
would
be
stored
in
memory
0.
This
loop
would
continue
to
generate
the
required
series
for
the
factorial.
After
this
loop
has
“finished”
and
memory
0
is
at
0,
we'd
like
to
see
the
results
of
all
the
products.
However,
since
the
last
thing
the
calculator
is
told
to
do
is
DJ,
an
Jcannot
immediately
follow
as
(GO
E)
produces
an
error
signal.
To
avoid
this,
you
can
puta
“|
(2)
"
at
the
end
of
the
program,
and
the
“final
product”
Gd)
1
(=)
gives
the
correct
result.
4-6

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI Programmable 57 and is the answer not in the manual?

Texas Instruments TI Programmable 57 Specifications

General IconGeneral
BrandTexas Instruments
ModelTI Programmable 57
CategoryCalculator
LanguageEnglish

Related product manuals