Yesterday once more, I began to count again, with endless passion and care. Here is my small program written for the future marriage and happiness (version 1.5).
//JAVA TEST OF ONE LIFE
int [] Life_A= new int[22+(int)(150 * Math.random())];
int [] Life_B= new int[23+(int)(150 * Math.random())];
bool smile_A;
bool [] smile_B=new bool[length(Life_B)];
bool happiness_A;
bool happiness_B;
int counter1=2007; //Counter for SM
int counter2=2007; //Counter for HA
for(i=22;i<length(Life_A);i++)
{
if (smile_B[i]==true)
counter1++;
if (smile_B[j]==true)
counter1++;
else if (smile_B[j]==false)
{
int tolerance1=10;
for(int s;s<=10;s++)
{
if (smile_B[s]==false)
tolerance1--;
}
if (tolerance1=0)
break;
else
counter1++;
}
}//TEST OF SMILE
for(j=22;i<length(Life_A);j++)
{
if (happiness_B[j]==true)
counter2++;
else if (happiness_B[j]==false)
{
int tolerance2=5;
for(int k=j+10;k<=5;k++)
{
if (happiness_B[k]==false)
tolerance2--;
}
if (tolerance2=0)
break;
else
counter2++;
}
}//TEST OF HAPPINESS
////////////////////////////////RESULTS////////////////////////////////////////
if (counter1==length(Life_A)+1985)&&counter2==length(Life_A)+1985)
{
smile_A=true;
happiness_A=true;
}
else if (counter1==length(Life_A)+1985)&&counter2<length(Life_A)+1985)
{
smile_A=true;
happiness_A=false;
}
else
{
smile_A=false;
happiness_A=false;
}
//END TEST
没有评论:
发表评论