CSCE106 Lab Session 6
CSCE106 Lab Session 6
Objectives:
Problems:
Write a C++ program or each of the following problems:
1. Draw a Flow chart and write a program in C++ that reads three scores of a student in three tests
to compute and display the largest score.
2. Draw a Flow chart and write a program in C++ that reads three scores of a student in three tests
to compute and display the smallest score.
3. Draw a Flow chart and write a program in C++ that reads three scores of a student in three tests
to compute and display the smallest and largest scores.
4. Draw a Flow chart and write a program in C++ that reads three scores of a student in three tests
to compute and display the sum of the best-two scores.
5. Community Hospital needs a program to compute and print a statement for each patient. Charges
for each day are as follows:
a) Room charges: private room, $125.00; semiprivate room, $95.00; or ward, $75.00
b) Telephone charge: $1.75
c) Television charge: $3.50
Write a program to get one string of four characters from the keyboard, the first character is an
integer value indicating the number of days spent in the hospital, and the others are three
alphabet characters. Typical input is: 5PNY
where 5 indicates the number of days spent in the hospital, P represents the room type (P, S, or
W), N represents the telephone option (Y or N), and Y represents the television option (Y or N).
Instructions: