| | |
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 |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings struct temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






