📄 nextdlg.cpp
字号:
}
if(m3[3]==m3[4]){
m3[3]=-1;
}
//////////////
////////////////////////////////
if(m4[0]==m4[1]||m4[0]==m4[2]||m4[0]==m4[3]||m4[0]==m4[4]){
m4[0]=-1;
}
if(m4[1]==m4[2]||m4[1]==m4[3]||m4[1]==m4[4]){
m4[1]=-1;
}
if(m4[2]==m4[3]||m4[2]==m4[4]){
m4[2]=-1;
}
if(m4[3]==m4[4]){
m4[3]=-1;
}
//////////////
////////////////////////////////
if(m5[0]==m5[1]||m5[0]==m5[2]||m5[0]==m5[3]||m5[0]==m5[4]){
m5[0]=-1;
}
if(m5[1]==m5[2]||m5[1]==m5[3]||m5[1]==m5[4]){
m5[1]=-1;
}
if(m5[2]==m5[3]||m5[2]==m5[4]){
m5[2]=-1;
}
if(m5[3]==m5[4]){
m5[3]=-1;
}
//////////////
////////////////////////////////
if(m6[0]==m6[1]||m6[0]==m6[2]||m6[0]==m6[3]||m6[0]==m6[4]){
m6[0]=-1;
}
if(m6[1]==m6[2]||m6[1]==m6[3]||m6[1]==m6[4]){
m6[1]=-1;
}
if(m6[2]==m6[3]||m6[2]==m6[4]){
m6[2]=-1;
}
if(m6[3]==m6[4]){
m6[3]=-1;
}
//////////////
////////////////////////////////
if(m7[0]==m7[1]||m7[0]==m7[2]||m7[0]==m7[3]||m7[0]==m7[4]){
m7[0]=-1;
}
if(m7[1]==m7[2]||m7[1]==m7[3]||m7[1]==m7[4]){
m7[1]=-1;
}
if(m7[2]==m7[3]||m7[2]==m7[4]){
m7[2]=-1;
}
if(m7[3]==m7[4]){
m7[3]=-1;
}
//////////////
CString string="";
long counter=0;
for(int a=0;a<5;a++)
for(int b=0;b<5;b++)
for(int c=0;c<5;c++)
for(int d=0;d<5;d++)
for(int e=0;e<5;e++)
for(int f=0;f<5;f++)
for(int g=0;g<5;g++)
{
//string.Format("%d %d %d %d %d %d %d",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
if(m1[a]!=-1&&m2[b]!=-1&&m3[c]!=-1&&m4[d]!=-1&&m5[e]!=-1&&m6[f]!=-1&&m7[g]!=-1
)
{
randcur.m_1=m1[a];
randcur.m_2=m2[b];
randcur.m_3=m3[c];
randcur.m_4=m4[d];
randcur.m_5=m5[e];
randcur.m_6=m6[f];
randcur.m_7=m7[g];
good=false;
test();
bool zhong=false;
bool da=false;
bool da2=false;
bool da1=false;
bool date=false;
if(good==true){
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4||money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5
||money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
string.Format("%d %d %d %d %d %d %d,5元",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
zhong=true;
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5||money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
string.Format("%d %d %d %d %d %d %d,20元",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
string.Format("%d %d %d %d %d %d %d,300元",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
da2=true;
string.Format("%d %d %d %d %d %d %d,2等奖",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
da1=true;
string.Format("%d %d %d %d %d %d %d,1等奖",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6&&money1->m_7==randcur.m_7)
{
zhong=true;
da=true;
date=true;
string.Format("%d %d %d %d %d %d %d,特等奖",m1[a],m2[b],m3[c],m4[d],m5[e],m6[f],m7[g]);
}
if(zhong==true){
if(da==true)
m_list4.AddString(string);
if(da1==true)
m_list6.AddString(string);
if(da2==true)
m_list5.AddString(string);
if(date==true)
m_list7.AddString(string);
m_list3.AddString(string);
counter++;
}
}
}
}
m_zhong.Format("%d",counter);
UpdateData(false);
}
void Cnextdlg::Ontest5()
{
m_list.ResetContent();
pos=caipiaolist.GetHeadPosition();
for(int i=0;i<m_data-1;i++)
caipiaolist.GetNext(pos);
Cmoney*money1=caipiaolist.GetAt(pos);
m_show.Format("%d:%d %d %d %d %d %d %d ",money1->m_date,money1->m_1
,money1->m_2,money1->m_3,money1->m_4,money1->m_5,money1->m_6,money1->m_7);
if(m_data!=0)
caipiaolist.GetNext(pos);
else
{
m_data=0;
m_show="..........";
}
Cmoney*money=caipiaolist.GetAt(pos);
caipiaolist.GetNext(pos);
Cmoney*money2=caipiaolist.GetAt(pos);
CString string="";
int hao[7]={0,0,0,0,0,0,0};
int zuhe[5][7];
hao[0]=11-money->m_1;
hao[1]=10-money->m_2;
hao[2]=9-money->m_3;
hao[3]=10-money->m_4;
hao[4]=11-money->m_5;
hao[5]=10-money->m_6;
hao[6]=money->m_7+1;
if(money->m_1>1&&money->m_2>0&&money->m_4>0&&money->m_5>1&&money->m_6>0&&money->m_7<7)
{
}
else
{
int counter=0;
if(money->m_1<=1)
{
hao[0]=0;
}
if(money->m_2<1)
{
hao[1]=4;
}
if(money->m_4<1)
{
hao[3]=4;
}
if(money->m_5<=1)
{
hao[4]=0;
}
if(money->m_6<1)
{
hao[5]=4;
}
if(money->m_7>=7)
{
hao[6]=money->m_7-1;
}
}
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
zuhe[0][0]=hao[0];
zuhe[0][1]=hao[1];
zuhe[0][2]=hao[2];
zuhe[0][3]=hao[3];
zuhe[0][4]=hao[4];
zuhe[0][5]=hao[5];
zuhe[0][6]=hao[6];
m_list.AddString(string);
UpdateData(false);
///////////////第2种组合
hao[0]=11-money2->m_1;
hao[1]=10-money2->m_2;
hao[2]=9-money2->m_3;
hao[3]=10-money2->m_4;
hao[4]=11-money2->m_5;
hao[5]=10-money2->m_6;
hao[6]=money2->m_7+1;
if(money2->m_1>1&&money2->m_2>0&&money2->m_4>0&&money2->m_5>1&&money2->m_6>0&&money2->m_7<7)
{
}
else
{
int counter=0;
if(money2->m_1<=1)
{
hao[0]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_2<1)
{
hao[1]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_4<1)
{
hao[3]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_5<=1)
{
hao[4]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_6<1)
{
hao[5]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_7>=7)
{
hao[6]=money2->m_7-1;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
}
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
zuhe[1][0]=hao[0];
zuhe[1][1]=hao[1];
zuhe[1][2]=hao[2];
zuhe[1][3]=hao[3];
zuhe[1][4]=hao[4];
zuhe[1][5]=hao[5];
zuhe[1][6]=hao[6];
m_list.AddString(string);
////////////////
///////////////第3种组合
hao[0]=11-money->m_1;
hao[1]=10-money2->m_2;
hao[2]=9-money->m_3;
hao[3]=10-money2->m_4;
hao[4]=11-money->m_5;
hao[5]=10-money2->m_6;
hao[6]=money->m_7+1;
if(money2->m_1>1&&money2->m_2>0&&money2->m_4>0&&money2->m_5>1&&money2->m_6>0&&money2->m_7<7)
{
}
else
{
int counter=0;
if(money->m_1<=1)
{
hao[0]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_2<1)
{
hao[1]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_4<1)
{
hao[3]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_5<=1)
{
hao[4]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_6<1)
{
hao[5]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_7>=7)
{
hao[6]=money->m_7-1;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
}
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
zuhe[2][0]=hao[0];
zuhe[2][1]=hao[1];
zuhe[2][2]=hao[2];
zuhe[2][3]=hao[3];
zuhe[2][4]=hao[4];
zuhe[2][5]=hao[5];
zuhe[2][6]=hao[6];
m_list.AddString(string);
////////////////
///////////////第4种组合
hao[0]=11-money2->m_1;
hao[1]=10-money->m_2;
hao[2]=9-money2->m_3;
hao[3]=10-money->m_4;
hao[4]=11-money2->m_5;
hao[5]=10-money->m_6;
hao[6]=money2->m_7+1;
if(money2->m_1>1&&money2->m_2>0&&money2->m_4>0&&money2->m_5>1&&money2->m_6>0&&money2->m_7<7)
{
}
else
{
int counter=0;
if(money2->m_1<=1)
{
hao[0]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_2<1)
{
hao[1]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_4<1)
{
hao[3]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_5<=1)
{
hao[4]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_6<1)
{
hao[5]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_7>=7)
{
hao[6]=money2->m_7-1;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
}
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
zuhe[3][0]=hao[0];
zuhe[3][1]=hao[1];
zuhe[3][2]=hao[2];
zuhe[3][3]=hao[3];
zuhe[3][4]=hao[4];
zuhe[3][5]=hao[5];
zuhe[3][6]=hao[6];
m_list.AddString(string);
////////////////
///////////////第5种组合
hao[0]=10-money->m_1;
hao[1]=9-money->m_2;
hao[2]=11-money2->m_3;
hao[3]=10-money->m_4;
hao[4]=11-money2->m_5;
hao[5]=10-money->m_6;
hao[6]=money2->m_7+1;
if(money2->m_1>1&&money2->m_2>0&&money2->m_4>0&&money2->m_5>1&&money2->m_6>0&&money2->m_7<7)
{
}
else
{
int counter=0;
if(money->m_1<1)
{
hao[0]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_3<=1)
{
hao[2]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_4<1)
{
hao[3]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_5<=1)
{
hao[4]=0;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money->m_6<1)
{
hao[5]=4;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
if(money2->m_7>=7)
{
hao[6]=money2->m_7-1;
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
}
}
string.Format("%d %d %d %d %d %d %d",hao[0],hao[1],hao[2],hao[3],hao[4],
hao[5],hao[6]);
zuhe[4][0]=hao[0];
zuhe[4][1]=hao[1];
zuhe[4][2]=hao[2];
zuhe[4][3]=hao[3];
zuhe[4][4]=hao[4];
zuhe[4][5]=hao[5];
zuhe[4][6]=hao[6];
m_list.AddString(string);
////////////////
UpdateData(false);
//////////////////test
for(int jjj=0;jjj<5;jjj++)
{
randcur.m_1=zuhe[jjj][0];
randcur.m_2=zuhe[jjj][1];
randcur.m_3=zuhe[jjj][2];
randcur.m_4=zuhe[jjj][3];
randcur.m_5=zuhe[jjj][4];
randcur.m_6=zuhe[jjj][5];
randcur.m_7=zuhe[jjj][6];
bool zhong=false;
bool da=false;
bool da2=false;
bool da1=false;
bool date=false;
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4||money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5
||money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
string.Format("%d %d %d %d %d %d %d,5元",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
zhong=true;
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5||money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
string.Format("%d %d %d %d %d %d %d,20元",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5
||money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
string.Format("%d %d %d %d %d %d %d,300元",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5||money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
da2=true;
string.Format("%d %d %d %d %d %d %d,2等奖",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6)
{
zhong=true;
da=true;
da1=true;
string.Format("%d %d %d %d %d %d %d,1等奖",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
}
if(money1->m_1==randcur.m_1&&money1->m_2==randcur.m_2&&money1->m_3==randcur.m_3&&money1->m_4==randcur.m_4&&money1->m_5==randcur.m_5&&money1->m_6==randcur.m_6&&money1->m_7==randcur.m_7)
{
zhong=true;
da=true;
date=true;
string.Format("%d %d %d %d %d %d %d,特等奖",randcur.m_1,randcur.m_2,randcur.m_3,randcur.m_4,randcur.m_5,randcur.m_6,randcur.m_7);
}
if(zhong==true){
if(da==true)
m_list4.AddString(string);
if(da1==true)
m_list6.AddString(string);
if(da2==true)
m_list5.AddString(string);
if(date==true)
m_list7.AddString(string);
m_list3.AddString(string);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -