kill(all)$

van=facebook.com/LearningCalculus$

3*Apple + 0*Banana + 0*Coconut = 30$

1*Apple + 2*Banana + 0*Coconut = 18$

0*Apple + 1*Banana - 1*Coconut = 2$

fruitMatrix:matrix([3,0,0],[1,2,0],[0,1,-1]);

rightHandSide:matrix([30],[18],[2]);

fruitValues:first(linsolve_by_lu(fruitMatrix,rightHandSide));

sum (fruitValues[fruit], fruit, 1, length(fruitValues));