solve for three unknowns with two equations Apple cost 97 dollars. Orange cost 56 and lemon cost 3. The total amount spent is 16047 dollars and total fruits bought is 240 and each one is bought atleast one. Calculate how many of each have been bought?
I tried to make these equations: x+ y+ z=240 , 97x+56y+ 3z=16047 but I can't proceed further.
 A: You mention in the comments that you derived a third equation from the first two, $94x+53y= 15327$, and you are looking for solutions where $x,y \in \mathbb{N}$. This is known as a linear Diophantine equation in two variables (with the additional constraint that $x$ and $y$ must be positive). You can find a complete procedure for solving such equations here. If you are curious about why this procedure works or if you find yourself confused by the Wolfram page, a more complete explanation is found in this lecture.
A: From a purely algebraic point of view (forgive me but this is the only way I can think in mathematics), using the two equations you wrote, you could eliminate $x$ and $y$ as a function of $z$. This leads to $$x=\frac{2607+53 z}{41} $$ $$y=\frac{7233-94 z}{41} $$ and you need to find the integer values of $z$ which make $x$ and $y$ integers, greater or equal to $1$. The equation giving $y$ restricts the domain to $1 \le z \le 76$.
One thing you can do, even if not elegant, is to minimize $$\Phi(z)=(x-\lfloor x\rfloor )^2+(y-\lfloor y\rfloor )^2$$ or to solve $$\Psi(z)=(x-\lfloor x\rfloor )+(y-\lfloor y\rfloor )$$ which have a single solution corresponding to $z=39$ and $\Phi(39)=\Psi(39)=0$ 
