Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC help PLEASE!! Pin
messin187-Feb-05 10:38
messin187-Feb-05 10:38 
GeneralUsing hot key to play CD with Hook !?! Pin
TTT812-Feb-05 14:13
TTT812-Feb-05 14:13 
QuestionWhy I was rejected so much with following resume ? Pin
vgrigor12-Feb-05 13:43
vgrigor12-Feb-05 13:43 
AnswerRe: Why I was rejected so much with following resume ? Pin
Bob Ciora2-Feb-05 14:11
Bob Ciora2-Feb-05 14:11 
GeneralRe: Why I was rejected so much with following resume ? Pin
vgrigor12-Feb-05 14:27
vgrigor12-Feb-05 14:27 
GeneralRe: Why I was rejected so much with following resume ? Pin
Anthony_Yio2-Feb-05 23:19
Anthony_Yio2-Feb-05 23:19 
GeneralRe: Why I was rejected so much with following resume ? Pin
vgrigor13-Feb-05 0:06
vgrigor13-Feb-05 0:06 
Generalmath puzzle Pin
ghostpirate72-Feb-05 13:26
ghostpirate72-Feb-05 13:26 
I'm trying to use this to figure out this problem:
1abc x 4 = de52 The letters a, b, c, d, e each represents a digit in the range 1-9. No digit can be used twice. 1, 5, 2, are already used.
Just wondering if any of you have good ideas of how to get the answer. Below is some of the code I started to write for it.



#include<iostream>

using namespace std;

bool checkSolution(int,int,int,int,int);//
void display(int,int,int,int,intmain()
{


int a,b,c,d,e;
int count=0, checkR=0;






for (int a=3; a<9; a++)

{
if (a > 9 || a==5 || a==4 ) continue;

for (int b=3; b<9; b++)

{
if (b > 9 || b==5 || b==4) continue;

for (int c=3; c<9; c++)

{
if (c > 9 || c==5 || c==4) continue;

for (int d=3; d<9; d++)

{
if (d >= 9 || d==5 || d==4) continue;

for (int e=3; e<9; e++)

{
if (e >= 9 || e==5 || e==4) continue;

if (a!=b && a!=c && a!=d && a!=e)
{
count++;
break;
}

checkR=checkSolution(a,b,c,d,e);

if (checkR==1);
display(a,b,c,d,e);


}
}
}
}

}



}// end of main


bool checkSolution(int a, int b, int c, int d, int e)
{
if ((a!=b && a!=c && a!=d && a!=e) && ((1+a+b+c)*4==(d+e+52)))

return 1; // temporary return so sample will compile

else
return 0;



}


void display(int a, int b, int c, int d, int e)
{

cout << "1" << a << b << c << "\n";

}
GeneralRe: math puzzle Pin
Bob Ciora2-Feb-05 13:43
Bob Ciora2-Feb-05 13:43 
GeneralPerformance Testing Pin
LighthouseJ2-Feb-05 12:56
LighthouseJ2-Feb-05 12:56 
GeneralRe: Performance Testing Pin
Bob Ciora2-Feb-05 13:28
Bob Ciora2-Feb-05 13:28 
GeneralRe: Performance Testing Pin
LighthouseJ2-Feb-05 13:30
LighthouseJ2-Feb-05 13:30 
GeneralRe: Performance Testing Pin
Bob Ciora2-Feb-05 13:44
Bob Ciora2-Feb-05 13:44 
GeneralLink in RichEditCtrl Pin
merkit2-Feb-05 12:48
merkit2-Feb-05 12:48 
GeneralPrivate inheritance question Pin
marinme2-Feb-05 12:03
marinme2-Feb-05 12:03 
GeneralRe: Private inheritance question Pin
Bob Ciora2-Feb-05 12:48
Bob Ciora2-Feb-05 12:48 
GeneralConverting DBCS to Unicode Pin
RYU^^2-Feb-05 11:37
RYU^^2-Feb-05 11:37 
GeneralRe: Converting DBCS to Unicode Pin
Anthony_Yio2-Feb-05 23:26
Anthony_Yio2-Feb-05 23:26 
GeneralRe: Converting DBCS to Unicode Pin
RYU^^3-Feb-05 11:26
RYU^^3-Feb-05 11:26 
GeneralRe: Converting DBCS to Unicode Pin
Anthony_Yio3-Feb-05 15:40
Anthony_Yio3-Feb-05 15:40 
GeneralRe: Converting DBCS to Unicode Pin
RYU^^3-Feb-05 17:34
RYU^^3-Feb-05 17:34 
GeneralRe: Converting DBCS to Unicode Pin
Anthony_Yio3-Feb-05 19:29
Anthony_Yio3-Feb-05 19:29 
GeneralRe: Converting DBCS to Unicode Pin
RYU^^3-Feb-05 19:50
RYU^^3-Feb-05 19:50 
GeneralClipboard functions Pin
TeresaPrice2-Feb-05 7:44
TeresaPrice2-Feb-05 7:44 
GeneralRe: Clipboard functions Pin
BlackDice2-Feb-05 10:43
BlackDice2-Feb-05 10:43 

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.