Click here to Skip to main content
15,915,764 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: need help in program Pin
Maximilien7-Feb-06 7:41
Maximilien7-Feb-06 7:41 
GeneralRe: need help in program Pin
taurus7777-Feb-06 8:19
taurus7777-Feb-06 8:19 
GeneralRe: need help in program Pin
David Crow7-Feb-06 8:25
David Crow7-Feb-06 8:25 
GeneralRe: need help in program Pin
Maximilien7-Feb-06 9:39
Maximilien7-Feb-06 9:39 
GeneralRe: need help in program Pin
taurus7777-Feb-06 10:23
taurus7777-Feb-06 10:23 
GeneralRe: need help in program Pin
Nitron7-Feb-06 10:41
Nitron7-Feb-06 10:41 
GeneralRe: need help in program Pin
Wim Engberts7-Feb-06 22:22
Wim Engberts7-Feb-06 22:22 
GeneralRe: need help in program Pin
beko7-Feb-06 23:54
beko7-Feb-06 23:54 
Keep an array of alphabet, and take two letters as input.
And then create a copy of the removed letters and store it as an array.

then, use a combination generator (you can google for it), a JAVA implementation can be found below. (The only problem you would face to port this code to C++ or C is the BigInteger class, you might use __int64 for factorial calculation. you need to be able to assign 24! in that implementation, the int type might also work, you can check it by calculating 24! Smile | :) .

http://www.merriampark.com/comb.htm[^]

however, if you consider comb(n,r) = n!/(n-r)!r! then 24!/(24-3)!3! = 24.23.22/3! so if you can modify the JAVA implementation likewise then you do not need to take care of bounds for 'int' for this particular problem.

this might be one of solutions, and thought out while writing.

Bekir.
GeneralRe: need help in program Pin
taurus7778-Feb-06 5:13
taurus7778-Feb-06 5:13 
QuestionListBox Pin
Mike Winter7-Feb-06 5:42
Mike Winter7-Feb-06 5:42 
AnswerRe: ListBox Pin
Blake Miller7-Feb-06 6:06
Blake Miller7-Feb-06 6:06 
GeneralRe: ListBox Pin
Mike Winter7-Feb-06 6:20
Mike Winter7-Feb-06 6:20 
Questiontemplates Pin
Russell'7-Feb-06 4:37
Russell'7-Feb-06 4:37 
AnswerRe: templates Pin
toxcct7-Feb-06 4:49
toxcct7-Feb-06 4:49 
GeneralRe: templates Pin
Russell'7-Feb-06 4:57
Russell'7-Feb-06 4:57 
GeneralRe: templates Pin
toxcct7-Feb-06 5:03
toxcct7-Feb-06 5:03 
GeneralRe: templates Pin
Russell'7-Feb-06 5:24
Russell'7-Feb-06 5:24 
GeneralRe: templates Pin
toxcct7-Feb-06 5:27
toxcct7-Feb-06 5:27 
AnswerRe: templates Pin
BadKarma7-Feb-06 4:56
BadKarma7-Feb-06 4:56 
GeneralRe: templates Pin
Russell'7-Feb-06 5:20
Russell'7-Feb-06 5:20 
GeneralRe: templates Pin
BadKarma7-Feb-06 5:48
BadKarma7-Feb-06 5:48 
AnswerRe: templates Pin
Michael Dunn7-Feb-06 7:17
sitebuilderMichael Dunn7-Feb-06 7:17 
QuestionActiveX with Visual Studio 6.0 Pin
MrChefman7-Feb-06 4:28
MrChefman7-Feb-06 4:28 
AnswerRe: ActiveX with Visual Studio 6.0 Pin
Anilkumar K V7-Feb-06 18:27
Anilkumar K V7-Feb-06 18:27 
GeneralRe: ActiveX with Visual Studio 6.0 Pin
MrChefman7-Feb-06 22:39
MrChefman7-Feb-06 22:39 

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.