This chapter introduces relational and logical operators. It also discusses the use of these operators to write Boolean expressions.
9. Range Testing
Answer:A 30 year old with $10000 credit could rent a car.
age >= 21 && credit >= 10000 --------- --------------- true true ---------------- true
Frequently you need to test if a number is within a certain range.
A welter weight boxer must weight between 136 and 147 pounds. A boxer's weight is tested before each fight to be sure that he is within his weight category. Here is a program that checks if a welter weight boxer's weight is within range:
Fill the blank so that weight is tested in two ways:
weightmust be equal or greater than 136
weightmust be less than or equal to 147