PenjumlahanDeretPecahan
Kamus:
Jumlah
: real
N : integer
P : integer
Algoritma:
Input(N)
Jumlah <-- 0
Tanda <-- +1
P <-- 1
While
p ≤ N do
Jumlaj <-- jumlah + (tanda * 1/x)
P ß p + 2
Tanda <-- - tanda
Operasi dasar
|
C(n)
|
C(5)
|
Cop
|
Input/<--
|
4+3n
|
4+3(5)
|
a
|
+
|
2n
|
2(5)
|
b
|
≤
|
n
|
5
|
c
|
*
|
n
|
5
|
d
|
/
|
n
|
5
|
e
|
-
|
n
|
5
|
f
|
Output
|
1
|
1
|
g
|
T(5) = Cop
* C(5)
T(5) = 4+3(5)
* a + 2(5) * b + 5 * c + 5 * d + 5 * e + 5 * f + g
T(5) = 19a
+ 10b + 5c + 5d + 5e + 5f + g
T(n) = Cop * C(n)
T(n) = (4+3n)a + (2n)b +
n(c) + n(d) + n(e) + n(f) + g
0 komentar:
Posting Komentar