К
1 – aniqlanadigan nuqtalarning tartibi. Siklga kirishdan oldin unga nol qiymatini berish lozim.
2.
К
2 – halqaga tushuvchi nuqtalar soni. Siklga kirishdan oldin unga nol qiymatini berish lozim.
3.
Sikl sarlavqasi.
К
1
≤
300 va
К
2
≤
50 shartlarini tekshirish.
4.
Agar teksirish natijasi True bo‘lsa,
К
1 =
К
1 + 1 iteratsiyasini malgam oshirish
(x,y) nuxtasi koordinatalarini topish
-1.0
≤
x
≤
+1.0, -1.0
≤
y
≤
+1.0
Nuqtaning 0.25
≤
x
2
+ y
2
≤
1.0 halqasiga tegishliligini tekshirish
Agar
К
2 =
К
2 + 1 sharti bajarilsa, 3 punktga o‘tish
5.
К
1,
К
2 larni chiqarish
PDF created with pdfFactory trial version
www.pdffactory.com