how can I convert this if statement to switch statement by considering that I am using two variables here and I tried to solve it but not working
int child;
char gender;
int temp;
child=console.nextInt();
gender=console.next().charat(0);
if(gender=='m' && children>=4)
temp =1;
else if(gender=='m' && children<4)
temp =2;
else if(gender=='f' && children<4)
temp =3;
else
temp=4;
}
this is my code
int children;
double temp;
char gender;
children=console.nextInt();
switch(children , gender )
{
case < 4, 'm':
temp=1;
break;
default : salary=600;
}