Third If Statements Worksheet


 1.  Write the statements to read in a character and
 print a message stating whether the
 character is an uppercase letter, a lowercase letter, a digit, or a special
 character. An uppercase letter is any character that is greater than or
 equal to 'A' and less than or equal to 'Z'. A lowercase letter is any
 character that is greater than or equal to 'a' and less than or equal to 'z'.
 A digit is any character that is greater than or  equal to '0' and less
 than or equal to '9'. All other characters are special characters.

 2.  Write the statements to calculate and print the fine for a speeding
 ticket. Read in the speed limit and the actual speed, and calculate
 how much the driver was travelling over the speed limit. If the miles
 over the speed limit is between 1 and 15, the fine is $75. If the miles
 over the speed limit is between 16 and 24, the fine is $125. If the miles
 over the speed limit is 25 or more, the fine is $215. You can assume that
 the actual speed is greater than the speed limit.

Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2002