Click here to Skip to main content
15,898,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: save & open file... Pin
mr jets25-Apr-07 15:10
mr jets25-Apr-07 15:10 
GeneralRe: save & open file... Pin
Christian Graus25-Apr-07 15:14
protectorChristian Graus25-Apr-07 15:14 
GeneralRe: save & open file... Pin
mr jets25-Apr-07 15:19
mr jets25-Apr-07 15:19 
GeneralRe: save & open file... Pin
mr jets25-Apr-07 16:21
mr jets25-Apr-07 16:21 
QuestionInteger/Decimal control in Windows Froms Pin
Nooie25-Apr-07 13:59
Nooie25-Apr-07 13:59 
AnswerRe: Integer/Decimal control in Windows Froms Pin
Christian Graus25-Apr-07 14:21
protectorChristian Graus25-Apr-07 14:21 
QuestionCombinations or Permutations or something else?? Pin
allenmpcx25-Apr-07 12:18
allenmpcx25-Apr-07 12:18 
AnswerRe: Combinations or Permutations or something else?? Pin
Arun.Immanuel25-Apr-07 15:08
Arun.Immanuel25-Apr-07 15:08 
Try This:

create the following functions:
===============================

1.string arraytoString(int [])
This function must combine the array into string.

2.int countOnes(int [])
This function must count the number of "ones" present in the array.

3.int [] convertToBinary(int n,int s)
This function must convert the integer n to its binary equivaling and split them into an array of size s.
Ex: input:8,5 output: {0,1,0,0,0}

4.mainfunction()
{
 for(int i=0;i<2<sup>N</sup>;i++)//N->size 
 {
    int a[]=convertToBinary(i,N);
    if(countOnes(a)==N/2)
      print arraytoString(a);
 }

}











Regards,
Arun Kumar.A

AnswerRe: Combinations or Permutations or something else?? [modified] Pin
Luc Pattyn25-Apr-07 15:52
sitebuilderLuc Pattyn25-Apr-07 15:52 
GeneralRe: Combinations or Permutations or something else?? Pin
Arun.Immanuel25-Apr-07 16:09
Arun.Immanuel25-Apr-07 16:09 
Questionsolution urgent please Pin
netJP12L25-Apr-07 12:11
netJP12L25-Apr-07 12:11 
AnswerRe: solution urgent please Pin
Colin Angus Mackay25-Apr-07 21:22
Colin Angus Mackay25-Apr-07 21:22 
GeneralRe: solution urgent please Pin
netJP12L26-Apr-07 8:48
netJP12L26-Apr-07 8:48 
QuestionHiding the UI Pin
AAKAra25-Apr-07 12:04
AAKAra25-Apr-07 12:04 
AnswerRe: Hiding the UI Pin
caix25-Apr-07 15:19
caix25-Apr-07 15:19 
GeneralRe: Hiding the UI Pin
AAKAra27-Apr-07 4:12
AAKAra27-Apr-07 4:12 
GeneralRe: Hiding the UI [modified] Pin
caix29-Apr-07 13:44
caix29-Apr-07 13:44 
Questionanother windows form questions Pin
MarkSchultz25-Apr-07 11:44
MarkSchultz25-Apr-07 11:44 
AnswerRe: another windows form questions Pin
Rocky#25-Apr-07 22:22
Rocky#25-Apr-07 22:22 
Questiondrag drop operations between 2 listboxes Pin
rzvme25-Apr-07 8:53
rzvme25-Apr-07 8:53 
AnswerRe: drag drop operations between 2 listboxes Pin
Paul Conrad25-Apr-07 9:48
professionalPaul Conrad25-Apr-07 9:48 
AnswerRe: drag drop operations between 2 listboxes Pin
Dan Neely25-Apr-07 10:27
Dan Neely25-Apr-07 10:27 
GeneralRe: drag drop operations between 2 listboxes Pin
Paul Conrad25-Apr-07 10:56
professionalPaul Conrad25-Apr-07 10:56 
Questionproblem with passing method to thread class. Pin
hdv21225-Apr-07 8:39
hdv21225-Apr-07 8:39 
AnswerRe: problem with passing method to thread class. Pin
Tarakeshwar Reddy25-Apr-07 8:53
professionalTarakeshwar Reddy25-Apr-07 8:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.