
please wait
|
|
if
statements, let's just look at the first one:if (carType == 'e' || 'E' && age <= 25)
'E'
is an expression which will evaluate to a non-zero value, and therefore true
. Computers can't read your mind or make assumptions on your behalf - they will do exactly what you tell them to do. You need to be as explicit as possible:if((carType == 'e' || carType == 'E') && age <= 25)