Chiziqli algoritm
Ifodaning qiymatini hisoblash algoritmi (blok sxema) tuzing.
VW
R
S
2
, bu yerda
W
R
y
x
W
2
;
2
a) Masalani yechish algoritmi (blok-sxema).
boshlash
x,y,v
Pi=3.1415
W=(x+y)
2
/2
R=
2*Pi+W
S=Pi
R
2
+VW
145
2 –vazifa
Tarmoqlanuvchi algoritm
Ifodaning qiymatini hisoblash algoritmi (blok-sxema) tuzing.
2
0
,
3
sin
2
,
1
2
0
,
3
2
2
2
х
agar
x
х
agar
x
x
agar
x
x
y
a) Masalani yechish algoritmi (blok-sxema).
boshlash
x
Pi=3.1415
y=2x-1
Y ni chiqarish
y=x
2
+2x+3
y=Sin
2
x+3
tamom
X<0
x>Pi/2
Yo‘q
ha
ha
Yo‘q
146
3–vazifa
Takrorlanuvchi jarayonlarning algoritmi (blok-sxema) tuzish.
Topshiriqlarnibajarishnamunasi
a)
Ifodaningqiymatinihisoblashalgoritmi (blok-sxema) tuzing.
5
1
6
1
2
2
)
1
(
n
k
k
n
S
1) Masalani yechish algoritmi (blok-sxema).
boshlash
S ni chiqarish
S=S+P
tamom
K<=6
Yo‘q
ha
P=1; k:=1
k=k+1
P=P
(k
2
+1)
n<=5
Yo‘q
S=0; n=1
n=n+1
S=S+n
2
ha
147
4 – vazifa
b
)Sharti oldin yoki sharti keyin qo‗yilgan sikl operatoridan
foydalanib quyidagi ifodaning qiymatini eps aniqlik bilan hisoblash
algoritmini tuzing.
1
2
,
1
1
i
i
P
bu yerda eps = 0,001.
1) Masalani yechish algoritmi (blok-sxema).
boshlash
P ni chiqarish
tamom
ha
1/(i
2
+1)>=eps
Yo‘q
P=1; i=1
i=i+1
P=P
(1/(i
2
+1))
EPS
148
5– vazifa
c)
Ichma-ich joylashdan sikllardan foydalanib ifoda qiymatini
hisoblash algoritmi tuzing:
15
1
10
1
)
(
k
n
n
k
x
a
S
1) Masalani yechish algoritmi (blok-sxema).
1-Amaliy mashgulot uchun topshiriqlar.
amaliy mashg‘ulot
topshiriqlarni bajarishda har bir talaba dastlab
chiziqli, tarmoqlanish va tanlash buyruqlari haqida qisqacha ma‘lumot
berib, so‘ngra berilgan amaliy tooshiriqlarni bajaridi.
1-variant
a
)
1
1
2
/
y
x
u
a
y
x
t
b
arccos
2
sin
, bu yerda
65
,
12
x
;
255
,
2
y
;
205
,
3
u
,
88
,
0
t
b)
b
a
agar
a
b
b
a
agar
b
a
K
,
21
15
,
21
15
2
2
2
2
2
boshlash
ha
N
10
Yo‘q
n=1
n=n+1
S1=S1+(a
k
+x
n
)
a,x
S1=0
S ni chiqarish.
tamom
ha
K
15
Yo‘q
K=K+1
S=S+S1
K=1
S=0
149
c
)
5
1
12
1
3
2
n
i
i
n
S
ni hisoblang.
d) 1 dan n gacha toq sonlar kvadratlari yig‘indisini hisoblang.
e)
5
1
12
1
3
2
)
(
n
i
i
n
S
ni hisoblang
2-variant
a)
t
v
b
y
y
y
x
y
a
cos
sin
,
1
/
1
2
/
2
2
2
2
bu yerda
222
,
0
x
,
72
,
6
y
,
05
,
10
v
,
35
,
0
t
b)
Tomonlari bilan berilgan uchburchakning teng tomonli bo‗lishini
aniqlash algoritmi va dasturini tuzing.
c)
4
2
3
10
1
2
2
2
i
i
a
k
k
a
i
ai
i
P
ni hisoblang.
d) [a,b] oraliqda m soniga karrali sonlar ko‘paytmasini hisoblang
e)
10
1
4
2
3
a
i
a
k
k
S
ni hisoblang.
3-variant
a)
2
lg
,
2
1
3
2
/
v
u
b
y
x
a
y
x
x
y
,
bu
yerda
075
,
33
,
33
,
125
,
98
,
2
,
225
,
3
v
u
y
x
b)
c
b
a
z
y
x
S
,
,
min
,
,
max
d)
8
1
2
2
2
i
a
i
ai
i
P
ni hisoblang.
c) 1 dan 35 gacha bo‗lgan toq sonlar kvadratlarining yig‗indisi va juft
sonlar kvadratlarining ko‗paytmasini toping.
e)
5
1
8
1
3
2
)
(
n
i
i
n
S
ni hisoblang
4-variant
150
a)
,
;
2
/
4
3
4
y
l
y
b
y
x
a
bu
yerda
.
12
,
20
;
55
,
12
;
15
,
37
l
y
x
b)
hollarda
an
qo
x
y
x
y
va
y
x
agar
y
x
x
va
y
x
agar
y
x
z
lg
,
/
0
0
,
2
0
0
,
3
/
3
2
2
2
3
2
2
c) Berilgan son raqamlari yig‘indisini hisoblash dasturini tuzing.
d)
1
2
л
k
x
k
S
ni eps = 0,0001 aniqlik bilan hisoblang.
e)
5
1
10
1
4
2
)
(
k
j
j
k
S
ni hisoblang.
5-variant
a)
2
2
2
cos
y
x
a
,
2
2
2
3
3
ln
y
x
y
x
e
b
xy
, bu yerda x=1,42,
y
=2,035
b)
2
,
2
,
16
2
,
log
3
2
2
2
3
2
3
х
agar
x
a
х
agar
e
x
х
agar
x
x
Z
x
x
c)
12
1
3
6
1
2
i
n
i
n
S
ni hisoblang.
d) 2 dan 50 gacha 4 ga va 3 ga bo‗linadigan sonlarni chop
eting.
e)
3
1
5
1
10
1
2
2
)
(
n
k
j
n
j
k
S
ni hisoblang.
6-variant
a) Tomonlari bilan berilgan uchburchakning perimetri va yuzasini
hisoblang.
151
b) a, b, c sonlari berilgan. Ularning manfiylarini 2 marta oshiring,
musbatlarini 2 ga bo‗ling, nolga teng bo‗lganlarini o‗zgarishsiz qoldiring.
c) [a,b] oraliqdagi m soniga karrali sonlar yig‘indisini hisoblang.
d)
1
2
k
k
x
k
S
ni eps = 0,001 aniqlik bilan hisoblang.
e)
4
1
10
1
)
!
!
(
k
j
j
k
S
ni hisoblang
7-variant
a)
3
)
(
3
3
y
x
y
x
a
,
xy
e
x
y
y
x
b
lg
ln
; bu yerda x=1,0645,
y
=2,1365.
b)
0
,
7
4
3
0
,
1
2
3
x
agar
x
x
x
х
agar
x
tgx
в
c)
!
....
!
2
!
1
2
n
x
x
x
y
n
ni hisoblang.
d) y=tg(x+c) funksiya qiymatini [a,b] oraliqda h qadam bilan
hisoblang.
e)
3
1
4
1
5
1
)
!
!
!
(
n
k
j
n
j
k
S
ni hisoblang.
8-variant
a)
;
1
1
)
1
(
2
x
a
u
y
x
u
z
2
2
2
sin
y
x
x
u
;
2
1
x
; a=10,5,
y
=2,5 .
b)
0
,
9
3
0
,
7
2
3
2
3
х
agar
x
x
x
х
agar
x
x
c) S = m! + n! + k! ni hisoblang.
d)
1
2
....
5
9
3
4
1
2
n
n
S
ni hisoblang.
152
e)
3
1
5
1
3
4
1
2
)
(
k
i
n
ki
kn
S
ni hisoblang.
9-variant
a)
,
sin
cos
,
2
a
e
x
x
b
b
a
b
a
tg
e
t
x
x
bu yerda a=10, v=5, x=2.
b)
3
,
10
sin
8
,
0
3
,
3
,
3
,
5
ln
sin
6
,
5
2
3
х
agar
x
х
agar
tgx
e
x
х
agar
x
x
Z
x
c) [a,b] oraliqdagi n va m larga karrali bo‘lgan sonlar yig‘indisini
hisoblang.
d)
1
2
1
n
n
n
n
S
ni
001
,
0
E
aniqlik bilan hisoblang.
e)
3
1
5
1
3
4
1
2
)
(
k
i
n
ki
b
kn
a
S
ni hisoblang
0> Do'stlaringiz bilan baham: |