// Input for gender: 'm'
if ( (gender == ' ') || (gender != 'm') || (gender != 'w') || (gender != 'j') ){
System.out.println("Invalid gender input");
return -1.0;
} else{
Note: although I am having an unequal Check for m, the statement inside the if clause runs successfully, however it should jump into the else clause, because the input is 'm'
Aucun commentaire:
Enregistrer un commentaire