| | |
Please help
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
I need help about a question FOLLOWİNG (please use the c++)
Question is:
1-) You are given a set witl 10 elements.
X: { 23, 13, 25, 43, 45, 26, 10, 2, 27, 44 }
or you can choose any 10 elementsç it is not problem.
2-) You are asked to write a program which can generate subsets of X with specific number of elements.
your program's output should be like this:
X = { 23, 13, 25, 43, 45, 26, 10, 2, 27, 44 }
Enter the number of elements for subset generation : 9 (for example you entered 9 )
SUBSETS WITH 9 ELEMENTS
-----------------------------------
23 13 25 43 45 26 10 2 27
23 13 25 43 45 26 10 2 44
23 13 25 43 45 26 10 27 44
23 13 25 43 45 26 2 27 44
23 13 25 43 45 10 2 27 44
"
"
"
Question is:
1-) You are given a set witl 10 elements.
X: { 23, 13, 25, 43, 45, 26, 10, 2, 27, 44 }
or you can choose any 10 elementsç it is not problem.
2-) You are asked to write a program which can generate subsets of X with specific number of elements.
your program's output should be like this:
X = { 23, 13, 25, 43, 45, 26, 10, 2, 27, 44 }
Enter the number of elements for subset generation : 9 (for example you entered 9 )
SUBSETS WITH 9 ELEMENTS
-----------------------------------
23 13 25 43 45 26 10 2 27
23 13 25 43 45 26 10 2 44
23 13 25 43 45 26 10 27 44
23 13 25 43 45 26 2 27 44
23 13 25 43 45 10 2 27 44
"
"
"
•
•
Join Date: Jan 2009
Posts: 5
Reputation:
Solved Threads: 0
subset is a mathematical term for example if you have a set contains 3 elements x:{a, b, c, }
so
{a} is a subset of X with 1 elements
{b} is subset of x with 1 elements
{c} is a subset of x with 1 elements
{a,b} is asubset of x with 2 element
{a,c} is a subset of x with 2 elements
{b,c} is a subset of x with 3 elements like this...
I want to write a program that list the subsets specificly .
thank you very much..
so
{a} is a subset of X with 1 elements
{b} is subset of x with 1 elements
{c} is a subset of x with 1 elements
{a,b} is asubset of x with 2 element
{a,c} is a subset of x with 2 elements
{b,c} is a subset of x with 3 elements like this...
I want to write a program that list the subsets specificly .
thank you very much..
•
•
Join Date: Dec 2008
Posts: 12
Reputation:
Solved Threads: 2
I am vehbi your c++ asistant. we gave you this homework for learning c++, i take your ip from admin and checking with the ones that enter lms. you will get 0 and a discipline investigation is strated because of plagarism.
Last edited by ronjustincase; Jan 11th, 2009 at 6:16 pm.
![]() |
Other Threads in the C++ Forum
- Previous Thread: problem in Drawing a Unicode string on an Bitmap image in VC++
- Next Thread: Store Array
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib 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






