Hisoblash usullari fanidan laboratoriya ishlari



Download 3,72 Mb.
bet7/24
Sana13.07.2022
Hajmi3,72 Mb.
#790760
1   2   3   4   5   6   7   8   9   10   ...   24
Bog'liq
6.Hisoblash usullari fanidan LABORATORIYA ISHLARI

V


Tenglamalar sistemasini Gauss usulida yechish algoritmining blok sxemasiva dasturi quyida keltirilgan.




10 REM Gauss usuli


20 INPUT "n="; n
30 DIM a(n, n), d(n, n + 1), b(n), x(n)
40 FOR i = 1 TO n: FOR j = 1 TO n
50 INPUT "a(i,j)="; a(i, j): NEXT j
60 INPUT b(i): NEXT i
70 m = n + 1
80 REM kengaytirilgan matritsa qurish
90 FOR i = 1 TO n: FOR j = 1 TO n
100 d(i, j) = a(i, j): NEXT j
110 d(i, m) = b(i): NEXT i
120 REM to'g'ri yo'l
130 FOR k = 1 TO n - 1: IF d(k, k) <> 0 THEN 200
140 i = k
145 i=i + 1: IF d(i, k) <> 0 THEN 170
150 IF i < n THEN 130 ELSE 360
160 REM Tenglamani almashtirish
170 FOR j = k TO m: b(j) = d(k, j): d(k, j) = d(i, j)
180 d(i, j) = b(j): NEXT j
190 REM Tenglamani koeffitsientlarini hisoblash
200 c = d(k, k): FOR j = k TO m
210 d(k, j) = d(k, j) / c: NEXT j
220 FOR i = k + 1 TO n: FOR j = k + 1 TO m
230 d(i, j) = d(i, j) - d(k, j) * d(i, k): NEXT j, i
240 NEXT k
250 REM Teskari yo'l
260 IF d(n, n) = 0 THEN 360
270 x(n) = d(n, m) / d(n, n): k = n
280 k = k - 1: s = 0: FOR j = k + 1 TO n
290 s = s + d(k, j) * x(j): NEXT j
300 x(k) = d(k, m) - s: IF (k > 1) THEN 280
310 REM Natijani chiqarish
320 PRINT "Sistemaning yechimlari"
330 FOR i = 1 TO n
340 PRINT "x("; i; ")="; x(i): NEXT i
350 GOTO 400
360 IF d(n, m) <> 0 THEN 390
370 PRINT "Sistema cheksiz ko'p yechimga ega"
380 GOTO 400
390 PRINT "Sistema birgalikda emas"
400 END
RUN

1. EMBED Equation.3 7. EMBED Equation.3


2. EMBED Equation.3 8. EMBED Equation.3


3. EMBED Equation.3 9. EMBED Equation.3


4. EMBED Equation.3 10. EMBED Equation.3


5. EMBED Equation.3 11. EMBED Equation.3


6. EMBED Equation.3 12. EMBED Equation.3


13. EMBED Equation.3 17. EMBED Equation.3


14. EMBED Equation.3 18. EMBED Equation.3


15. EMBED Equation.3 19. EMBED Equation.3



Download 3,72 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10   ...   24




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish