Algoritmet
-
Upload
burim-guri -
Category
Documents
-
view
1.061 -
download
0
description
Transcript of Algoritmet
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
1/45 ©rk
Kolegji “Aga Xhite” Ferizaj
Gjuhë Programuese – Algoritmet Pjesa I
Ferizaj, 2009
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
2/45 ©rk
Detyra 1
FILLIM
x
Z
FUND
Z=3*x+2
x<1x≥1
Z=3*x
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
3/45 ©rk
Detyra 2
FILLIM
x
Z
FUND
jo
Z=x2+2
x<5x>5
Z=a Z=x*a+2
X=5
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
4/45 ©rk
Detyra.3 Të llogaritet Shuma e numrave natyror në mes numrave 1 dhe n nëse është dhënë vlera e variablës n :
n
iiS
1
S=0
i≤n
FILLIM
i=1
S=S+i
i=i+1
nS
FUND
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
5/45 ©rk
Detyra.4 Të llogaritet Shuma:
n
iiS
2
S=0
i ≤ n
FILLIM
i=2
S=S+i
i=i+1
n
S
FUND
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
6/45 ©rk
tek
Detyra.5
Të llogaritet Shuma:
n
iiS
1
S=0
i ≤ n
FILLIM
i=1
S=S+i
i=i+2
n
S
FUND
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
7/45 ©rk
çift
Detyra.6
Të llogaritet Shuma:
n
iiS
2
S=0
i ≤ n
FILLIM
i=2
S=S+i
i=i+2
n
S
FUND
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
8/45 ©rk
Detyra.7 Të llogaritet Shuma:
n
iiS
5
S=0
i ≤ n
FILLIM
i=5
S=S+i
i=i+1
n
S
FUND
po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
9/45 ©rk
Detyra.8 Të llogaritet Shuma:
n
iiS
5
2
S=0
i ≤ n
FILLIM
i=5
S=S+i2
i=i+1
n
S
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
10/45 ©rk
Detyra.9 Të llogaritet Shuma:
n
iiS
1
3
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
11/45 ©rk
Detyra.10 Të llogaritet Shuma:
n
ixiS
2)(
S=0
i ≤ n
FILLIM
i=2
S=S+(i+x)
i=i+1
n,xS
FUND
Po
jo
Detyra.11 Të llogaritet Shuma:
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
12/45 ©rk
n
ixiS
1
2)(
S=0
i ≤ n
FILLIM
i=1
S=S+(i+x)2
i=i+1
n,x
S
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
13/45 ©rk
Detyra.12 Të llogaritet Shuma:
n
iiS
5)23(
S=0
i ≤ n
FILLIM
i=5
S=S+(3i+2)
i=i+1
nS
FUND
Po
jo
Detyra.13
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
14/45 ©rk
Të llogaritet Shuma:
n
iixY
2)2(4
2
S=0
i ≤ n
FILLIM
i=2
S=S+(i+2x)
i=i+1
n,xS
FUND
Po
jo
sxY 42
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
15/45 ©rk
Detyra.14 Të llogaritet Shuma:
n
ixixY
2)23(4
2
S=0
i ≤ n
FILLIM
i=2
S=S+(3i+2x)
i=i+2
n,x
S
FUND
Po
jo
sxY 42
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
16/45 ©rk
Detyra.15 Të llogaritet Prodhimi:
n
i
iP1
P=1
i ≤ n
FILLIM
i=1
P=P*i
i=i+i
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
17/45 ©rk
Detyra.16 Të llogaritet Prodhimi:
n
i
iP2
P=1
i ≤ n
FILLIM
i=2
P=P*i
i=i+i
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
18/45 ©rk
(tek)
Detyra.17 Të llogaritet Prodhimi:
n
i
iP1
P=1
i ≤ n
FILLIM
i=1
P=P*i
i=i+2
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
19/45 ©rk
Detyra.18 Të llogaritet Prodhimi:
n
i
iP1
2
P=1
i ≤ n
FILLIM
i=1
P=P*i2
i=i+1
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
20/45 ©rk
Detyra.19 Të llogaritet Prodhimi:
n
çifti
iP2
3
P=1
i ≤ n
FILLIM
i=2
P=P*i3
i=i+2
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
21/45 ©rk
Detyra.20 Të llogaritet Prodhimi:
)2(
3
xiPn
i
P=1
i ≤ n
FILLIM
i=3
P=P*(i+2x)
i=i+2
n
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
22/45 ©rk
Detyra.21 Të llogaritet Prodhimi:
n
i
xiP2
1
)3(
P=1
i ≤ 2n
FILLIM
i=3
P=P*(3i+x)
i=i+1
n,x
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
23/45 ©rk
Detyra.22 Të llogaritet Prodhimi:
n
i
xiP3
1
)2(
P=1
i ≤ 3n
FILLIM
i=1
P=P*(i+2x)
i=i+1
n,x
Y
FUND
Po
jo
Y=3x+4P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
24/45 ©rk
Detyra.23 Të llogaritet Prodhimi:
13
2
)2(4n
i
xixY
P=1
i ≤ 3n-1
FILLIM
i=2
P=P*(i+2x)
i=i+1
n,x
Y
FUND
Po
jo
Y=x-4*P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
25/45 ©rk
Detyra.24 Të llogaritet Prodhimi:
1
1
)2(n
i
iP
P=1
i ≤ n+1
FILLIM
i=1
P=P*(i+2)
i=i+1
n,x
P
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
26/45 ©rk
Detyra.25 Të llogaritet Prodhimi:
n
i
xixY2
)3(3
P=1
i ≤ n
FILLIM
i=2
P=P*(i+3)
i=i+1
n,x
Y
FUND
Po
jo
Y=x+3*P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
27/45 ©rk
Detyra.26 Të llogaritet Prodhimi
S=0
i ≤ n+1
FILLIM
i=2
S=S+(4*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*S Z=x+5
x≤2 x≥2
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
28/45 ©rk
Detyra 27
S=0
i ≤ n+1
FILLIM
i=2
S=S+(2*i+1)
i=i+1
n,x
G
FUND
Po
jo
G=3x+2*S G=x-3
X<1.5x≥1.5
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
29/45 ©rk
Detyra 28.
S=0
i ≤ n+1
FILLIM
i=2
S=S+(2*i+1)
i=i+1
n,x
G
FUND
Po
jo
G=3x+2*S
x<5x≥5
S=0
i < n
i=2
S=S+(i+x)
i=i+1
Po
jo
G=2*S
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
30/45 ©rk
Detyra 29.
S=0
i ≤ n+1
FILLIM
i=2
S=S+(2*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*S
x<1x≥1
S=0
i < n+1
i=2
S=S+i2
i=i+2
Po
jo
Z=S
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
31/45 ©rk
Detyra 30
P=1
i ≤ n+1
FILLIM
i=2
P=P+(2*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*P
x<1x≥1
P=1
i < n+1
i=2
P=P+i2
i=i+2
Po
jo
Z=P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
32/45 ©rk
Detyra 31
S=0
i ≤ n+1
FILLIM
i=2
S=S+(2*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*S
x<1X>1
S=0
i < n+1
i=2
S=S+i2
i=i+2
Po
jo
Z=SZ=3X+2
X=1
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
33/45 ©rk
Detyra 32.
P=1
i ≤ n+2
FILLIM
i=2
P=P*(2*i+1)
i=i+1
n,x
G
FUND
Po
jo
G=3x+2*P G=x-3
X<1.5x≥1.5
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
34/45 ©rk
Detyra 33
P=1
i ≤ n+1
FILLIM
i=2
P=P*(2*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*P
x<1x≥1
P=1
i < n+1
i=2
P=P*i2
i=i+1
Po
jo
Z=P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
35/45 ©rk
Detyra 34
Z=3X+2
P=1
i ≤ n+1
FILLIM
i=2
P=P+(2*i+1)
i=i+1
n,x
Z
FUND
Po
jo
Z=3x+2*P
x<1X>1
P=1
i < n+1
i=2
P=P+i2
i=i+2
Po
jo
Z=P
X=1
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
36/45 ©rk
Detyra 35
S=0
i ≤ 2n
FILLIM
i=1
S=S+(2*i)
i=i+2
n,x
Z
FUND
Po
jo
Z=x+S
x<2.5x≥2.5
P=1
i < n+1
i=1
P=P*(i+2x)
i=i+1
Po
jo
Z=3*P
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
37/45 ©rk
Detyra 36 Të llogaritet faktorieli F=n!
F=1
i ≤ n
FILLIM
i=1
F=F*i
i=i+1
n
F
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
38/45 ©rk
Detyra 37 Të llogaritet faktorieli F= (2m+n-1)!
F=1
i = (2m+n-1)
FILLIM
i=1
F=F*i
i=i+1
n
F
FUND
Po
jo
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
39/45 ©rk
Detyra 38. Të llogaritet faktorieli F=(n+2)!
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
40/45 ©rk
Detyra 39. Të llogaritet funksioni Y=4x+(n+2)!
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
41/45 ©rk
Detyra 40 Të llogaritet vlera e faktorielit çift F=(2n)!!
FILLIM
F=1
F=F*i
n
i=i+2
F
FUND
JO
i=2n
i=2
PO
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
42/45 ©rk
Detyra 41.
Të llogaritet vlera e faktorielit tek F=(2n-1)!!
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
43/45 ©rk
Detyra 42.
Të llogaritet faktorieli brenda shumës:
n
i
inxY1
]3
)!2[(23
F=1
i = (n+2)
FILLIM
i=1
F=F*i
i=i+1
n
Po
S=0
i = n
i=1
S=S+(F+i/3)
i=i+1
Y
FUND
jo
Y=3*x+2*S
JO
PO
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
44/45 ©rk
Detyra 43.
Detyra 44.
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)
Algoritmet klasa XII Mësimdhënësi : Ramiz Kastrati
45/45 ©rk
Print to PDF without this message by purchasing novaPDF (http://www.novapdf.com/)