| | |
Can someone help me.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 5
Reputation:
Solved Threads: 0
How to write a program that output the number of different ways of arranging the number so that the displayed numbers add up to a fixed sum inputed byt the used.
For example, suppose the sum is 4. There are 8 different arrangements. It has to be listed in dictionary order.
1 1 1 1
1 1 2
1 2 1
1 3
2 1 1
2 2
3 1
4
For example, suppose the sum is 4. There are 8 different arrangements. It has to be listed in dictionary order.
1 1 1 1
1 1 2
1 2 1
1 3
2 1 1
2 2
3 1
4
It goes like this
c++ Syntax (Toggle Plain Text)
cout << "Do your homework yourself" << endl;
![]() |
Other Threads in the C++ Forum
- Previous Thread: Array/Function problems
- Next Thread: error C2664: 'setStartupDirectory' : cannot convert parameter
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






