943,828 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 1092
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 11th, 2009
-2

Please help

Expand Post »
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
"
"
"
Reputation Points: 6
Solved Threads: 0
Unverified User
kentaki is offline Offline
5 posts
since Jan 2009
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

does not seem to be a hard program to write?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Kevin Waite is offline Offline
2 posts
since Jan 2009
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

What exactly do you mean by subset? as in are you trying to list all the different permutations of the numbers?
Reputation Points: 325
Solved Threads: 118
Master Poster
Freaky_Chris is offline Offline
702 posts
since Apr 2008
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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..
Reputation Points: 6
Solved Threads: 0
Unverified User
kentaki is offline Offline
5 posts
since Jan 2009
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

No one is going to write this program for you. You need to make an attempt, then when you get stuck, ask a specific question.
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,374 posts
since Jan 2008
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

you are exactly right
Reputation Points: 6
Solved Threads: 0
Unverified User
kentaki is offline Offline
5 posts
since Jan 2009
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

if I was able to write this program I did not want help from people.
secondly I had made lots of attempt myself but I had failed and I have only 27 hours to complete this program... thaks for your advice..
Reputation Points: 6
Solved Threads: 0
Unverified User
kentaki is offline Offline
5 posts
since Jan 2009
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

So where are your failed attempts, that was the point being made....we didnt say write it correctly then show it us...we said have a go and show us what you have and what it is you are having problems with
Reputation Points: 325
Solved Threads: 118
Master Poster
Freaky_Chris is offline Offline
702 posts
since Apr 2008
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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.
Reputation Points: 11
Solved Threads: 2
Newbie Poster
ronjustincase is offline Offline
12 posts
since Dec 2008
Jan 11th, 2009
0

Re: Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

^^ i believe now is the time say: OWNED! /\/[][]/3
Reputation Points: 18
Solved Threads: 4
Junior Poster
Bladtman242 is offline Offline
163 posts
since Dec 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: problem in Drawing a Unicode string on an Bitmap image in VC++
Next Thread in C++ Forum Timeline: Store Array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC