Design and implement a program that will accept a person’s age, number of year driving, and whether or not they drink. The program will determine whether they are eligible for car insurance or not. A person under 22 is not eligible. People 22 and up to 30 are eligible if they do not drink and are driving 3 years or more. People over 30 are eligible if they have at least 6 years driving experience. You need to display an appropriate message to the person who is applying for insurance.
its all working except for over 30 which seems to be running the first if for some reason can somebody please help me understand what is wrong
here is my code
also can somebody tell me how efficient this code is...and how would be the best way to write this...thanks
Jon,
This line of code has an error in it:
<br />
<br /> It says that if the drivers age is greater than/equal to 22 or less than/equal to 30. "or" means that either condition must be true. So if driverAge is 55, we have
<br /> 55 >= 22 or 55 <= 30
true or false
true