EasyManua.ls Logo

AMSTRAD cpc 6128 - Mixed Calculations

AMSTRAD cpc 6128
520 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Mixed Calculations
(+,-,*,/)
Mixed
calculations
are
understood
by
the
computer,
but
they
are
calculated
within
certain
priorities.
First
priority
is
given
to
multiplication
and
division,
then
addition
and
subtraction.
These
priorities
apply only to calculations
containing
only
these
four
operations.·
If
the
calculation
was:
3+7-2*7/4
You
may
think
this
would be
calculated
as:
3+7-2
*7
14
= 8 *7
14
=
56/4
=
14
In
fact
it
is
calculated
as:
3+7-2*7/4
=3+7-14/4
=3+7-3.5
=10-3.5
=6.5
Prove
this
by
typing
in
this
calculation
as
it
is written:
Type:
? 3 + 7 - 2 * 7 1 4
[RETURN]
6.5
You
can
change
the
way
the
computer
calculated
this
by
adding
brackets.
The
computer
will
deal
with
the
calculation
inside
brackets
prior
to
the
multiplication
etc, outside
the
brackets.
Prove
this
by
typing
in
the
calculation
including
brackets.
Type:
?
(3+7-2)
*714
[RETURN]
14
Chapter 1
Page
36
Foundation Course

Table of Contents