You are on page 1of 2

Mathematical algorithms series

In this issue we will deal with algorithms repetition structure (While, or


Repeat Until)
and mathematical functions of potentiation and root extraction.

Power Function (POT)=( POTENTIATION)

Exemple:
Xn = Pot (x, n)
X 2 = Pot (X, 2)
35 = Pot (3, 5)
x = X 1/2 - -> Pot (X, )
6

= Pot (6, )

3 4

= Pot (4, 1/3)

4 7

= Pot (7, 1/4)

= POT (POT(X, 1/2), POT(Y, 1/2))

ALGORITHMS SERIES
Exercise
Develop an algorithm that generates the value of
the S series down to the 50th term.
7

S=

X +W 4
5
100

X +W 5
10
200

+ to the 40th term

RESOLUTION:
P2
X +W P 3
P 4
P5

P1

S=

1 STEP I =

P 1

P2

= POT (POT(X, 1/ POT (P1,

)), P2) +
2 STEPII =
3 STEPIII=

P3

P 4

= POT (W, P3)

P 5 = POT (P5, 1/ POT (P4, ))

4 STEPSTART
Real: S, X, P1, P2, P3, P4, P5, CONT;
S = 0; , P1=2, P2=2, P3=-1, P4=5, P5=100; Cont = 1;
read (X, W);
while (CONT < = 40) DO
S = I +II/III
P1= P1=2
P2= P2=2
P3= P3=-1
P4= P4=5
P5= P5=+100
CONT= CONT +1;
end_ while;
WRITE (S);
END.

You might also like