1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void solveEquation(double &,double &);
int main ()
{
double k;
double j;
solveEquation(k,j);
cout << k << j;
}
void solveEquation(double a, double b, double c, double d, double e, double f, double &x, double &y)
{
cout << "Enter a,b,c,d,e,f: ";
cin >> a,b,c,d,e,f;
x = (e*d - b* f)/(a*d - b*c);
y = (a*f - e* c)/(a*d-b*c);
}
|