|
From: parijat c. <par...@op...> - 2007-09-13 05:20:20
|
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=20
possible s=3D
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
--=20
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com
Powered by Outblaze
|