Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Cramer's Rule variable locations

$
0
0
My assignment is to use the Cramer's Rule to understand basic C++ layout for objects and classes. I have a class created and data fields for the variables, constructor for arguments of data fields, and functions for getX, getY, and isSolvable.

My questions is: where does e = (ax + by) and f = (cx + dy) go? In the function getX or getY or in the constructor for e/f or even in main?

double getX()
{
	double x =((e*d)-(b*f)/(a*d)-(b*c));
return x;
}
double getY()
{
	double y = ((a*f)-(e*c)/(a*d)-(b-c));
	return y;
}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>