>>You wrote:
>>my teacher give me a problem,but m not able 2 solve this one.
>> problem statement is as:
>> you have a positive number and you have to break it into its all
>>possible s=
>> um combinations.
>> no pair of combinations is to be repeated.
>> eg.
>> 5 can be broken as:
>> 1+1+1+1+1
>> 2+1+1+1,2+2+1
>> 3+1+1,3+2
>> 4+1
>> 6 can be broken as:
>> 1+1+1+1+1+1
>> 2+1+1+1+1,2+2+1+1,2+2+2
>> 3+1+1+1,3+2+1,3+3
>> 4+1+1,4+2
>> 5+1
>> all these combinations is to be printed on console
>> thank you in advance
People on this mailing list are here to help. We are all very busy with our
lives. You need to put some effort forward to do your own work. We can help
answer questions, and even suggest ways of solving the problem, but
ultimately it is your problem and you need to figure it out. We can't do
your homework for you.....
As someone has already told you, this problem is very simple and straight
forward. If you analyze the numbers, a pattern will emerge......
-Adam Jones
i-softwarproducts.com
|