Erik <esigra <at> gmail.com> writes:
> Is there some simple little program to solve assignment problems? > Suppose that someone bought k meat (160), m fish (30) and n milk (15) > for 700. So it should solve the equation k * 160 + m * 30 + n * 15 = > 700. (A solution happens to be k = 4, m = 2, n = 0. An additional > condition could be that he bought at most 6 items; k + m + n <= 6. That > would eliminate solutions like k = 4, m = 0, n = 4.) First of all, if you post something to the list like this, put OT for off topic. Second of all, if you make *ANY* attempt to solve this on your own, you *might* get some programming tips, depending on which language you use. Personally, I'd just use C. Most important of all, the solution is trivial. Look at your last stated 'boundary condition', and get your head out of programming and think logically........ goodluck, James