2-mavzu bo'yicha laboratoriya yechimlari


Download 34.01 Kb.
Sana08.11.2020
Hajmi34.01 Kb.
#142757
Bog'liq
2-lab topshirig'i yechimlari


412-20 guruh talabasi Aliqulov Shaxboz

2-mavzu bo'yicha laboratoriya yechimlari

2-topshiriq:Berilgan koeffitsient va o‘ng tomon qiymatlarida tenglamalar sistemasining determinanti noldan farqli deb hisoblab sistema yechimi topilsin:

=================================================

#include

#include

using namespace std;

int main()

{ float a1, a2, b1, b2, c1, c2;

float x, y;

cout << "a1=" ; cin >> a1;

cout << "b1=" ; cin >> b1;

cout << "c1=" ; cin >> c1;

cout << "a2=" ; cin >> a2;

cout << "b2=" ; cin >> b2;

cout << "c2=" ; cin >> c2;

y = ((a2 / a1)*c1 - c2) / ((a2 / a1)*b1 - b2);

x = (c1 - b1*y) / a1;

cout << "x=" << x << " y=" << y;

_getch();

return 0; }



==================================================


Download 34.01 Kb.

Do'stlaringiz bilan baham:




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