Grade 7
/ Preparing for the Olympics 5 exercises (100% corrected)
- Logic (2 exercices)
- Euclidean division (1 exercice)
- Arithmetic (1 exercice)
- With a little algebra (1 exercice)
E.10825
A
calculation
program
Here
is
a
calculation
program
:
Let
N
be
a
natural
number
written
in
the
decimal
system
:
Step
n
o
1:
Identify
the
digit
X
of
the
units
of
N
.
Step
n
o
2:
Calculate
N
−
X
.
Let
M
be
the
number
ob-tained.
Step
n
o
3:
Divide
M
by
10
.
Let
D
be
the
number
ob-tained.
Step
n
o
4:
Calculate
D
+2
X
.
Let
R
be
the
number
ob-tained.
Step
n
o
5:
If
R
is
different
from
N
,
then
go
to
step
n
o
6.
Otherwise,
stop
and
display
R
.
Step
n
o
6:
If
R
is
written
with
a
single
digit,
then
stop
and
display
R
.
Otherwise,
give
N
the
value
R
and
resume
the
calculation
program
at
step
n
o
1.
1
What
result
is
displayed
when
N
=15
is
entered
into
the
calculation
program?
2
What
happens
when
N
=2015
is
entered
into
the
calcu-lation
program?
https://chingmath.fr
chapExoCorrec/10825
sacados/10825
Extrait Olympiade