if(age<30){} else if(age>30&&age<50){} else{}
没有什么大问题,你只是记错了括号位置
if(){ }else if(){ }else if(){ }
你的代码最好缩进一下,这样看起来清晰明白一些