Lab 5: Week of Aug 29-Sep 02
 



1. Write a program which given a score between 0 and 10 and outputs a
letter grade. A valid score is a floating point number (for example
5.53). The grading scheme is:

A for score >= 9.00
B for score >= 8.00
C for score >= 7.00
D for score >= 6.00
F otherwise

Use case statement for decision making. Do not use else-if. Hint: use
some arithmetic to convert floating point score to one of the case values.

2. Write a program which given three numbers a, b and c outputs them in
increasing order. For example given a=10; b=20; c=30 the output is "a <
b < c". Another example: given a=10; b=20; c=10 the output is "a = c <
b". Use if-else statement. Remember that you only know comparison
operators. You have no knowledge of "and" and "or" operators.

3. There will be a programming test for 60 minutes. The problems will be
given on the same day before the lab session. After finishing students will
mail the solutions to TAs for evaluation.