I'm using eclipse and its not giving me any errors. When running, it wont come out of the loop even if m, M, f or F is entered.
char gen;
do
{
System.out.print("Gender(m/f): ");
gen = EasyIn.getChar();
if(gen!='m'||gen!='M'||gen!='f'||gen!='F')
{
System.out.println("ERROR - Invalid gender");
}
}
while(gen!='m'||gen!='M'||gen!='f'||gen!='F');
Any help will be much appriaciated, Thank you.

New Topic/Question
Reply




MultiQuote




|