int end = 0;
for(a=0;a<3 && !end;a++){
for(b=0;b<20 && !end;b++){
if(hensu<0){
処理1;
end = 1;
}
else{
処理2;
end = 1;
}
}
}

もしくは関数化して、returnで抜けるとか。