[Dev-C++] Another problem.. this time logic is the problem.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Mansoor N. <man...@sy...> - 2001-10-10 23:23:04
|
Hi, this is an extract of a problem directly given to me by my teacher, without an explanation. Any help solving it would be greatly appreciated. Mansoor: Structured Sums Problem Using in order only the digits 3 through 7 to form numbers, and the operations + and - to combine those numbers, find all possible combinations totalling a given value. Each digit may be used only once in forming the numbers. For example, if the total were to be 25, your program should find these two possibilities: +3+4+5+6+7 +3-45+67 Your program should ask for the desired total, and then list those combinations (if any) yielding that total. |