Sie sind auf Seite 1von 1

Lab6

Laraine Shawa
COSC 1435
-This program calculate a customer's monthly bill
corresponding to the number of hours used.
-Input is number of hours used and which package chosen.
-Program reads the input using cin.
-The max number of hours is 744.
-Output is the monthly bill for the package chosen.
*Package A:
-$9.95 per month 10 hours of
access are provided.
-Additional hours are $2.00 per hour.
*Package B:
-$14.95 per month 20 hours of access are provided.
-Additional hours are $1.00 per hour.
*Package C:
-$19.95 per month unlimited access is provided.
The last part displays the number of hours corresponding to the 3rd
graph.
Results:
When I plug in numbers > 10 it calculates the amount in the first
moth.
If number of hours = 10, it prints out the fixed amount with 10
hours.
When you plug in number >20 it calculates the fixed amount.
If number of hours = 20, it prints out the fixed amount with the
entire day hours.
For example:
lshawa@penguin Lab7]$ g++ LMSisp1.cpp
LMSisp1.cpp:124:4: warning: no newline at end of file
[lshawa@penguin Lab7]$ ./a.out
Enter a package A, B, or C: B
This program calculates your monthly bill. Enter the number of hours 21
31.95
[lshawa@penguin Lab7]$ g++ LMSisp1.cpp
LMSisp1.cpp:116:4: warning: no newline at end of file
[lshawa@penguin Lab7]$ ./a.out
Enter a package A, B, or C: A
This program calculates your monthly bill. Enter the number of hours 15
19.95

Das könnte Ihnen auch gefallen