int a,b,c,d, e=11;
a=b=c=d=0;
do{
e = e+1;
a = a+1;
if(a>=2) b = b+1;
if(b>=2) c = c+1;
if(c>=2) d = d+1;
if((a&&b)&&(c&&d)){
printf(" %d",e);break;
}
}while(1); //outputs 15
Didn't really understand the last if statement. What does (a && b) means? Is is and operation?
Aucun commentaire:
Enregistrer un commentaire