Perpangkatan
Kamus:
a : real
n : integer
p : real
i : integer
Algoritma:
Input(a,n)
P <-- 1
For
i <-- 1 to n do
P <-- p * a
Output(p)
Operasi dasar
|
C(n)
|
C(10)
|
Cop
|
Input/<--
|
2+2n
|
2+2(10)
|
a
|
*
|
N
|
10
|
b
|
Output
|
1
|
1
|
C
|
T(10) = Cop * C(10)
T(10) = 22a+10b+c
T(n) = Cop * C(n)
T(n) = (2+2n)a+Nb+1c
0 komentar:
Posting Komentar