doublea;intb;if(b!=0){//给a赋值让它等于0.7}else{//给a赋值让它等于0.5}... double a;
int b;
if(b!=0){
//给a赋值让它等于0.7
}else{
//给a赋值让它等于0.5
}