Assignment 1.1 & 1.2 Solution

$30.00 $26.40


Write a program to play a simple game, guessing a secret integer the user has selected between a specified range.


Your have a cell phone and after a month of use, you are trying to decide which price plan is the best for your usage pattern.

There are 3 plan options available A, B, or C.

All plans have the same base price of $10 per month

Free minutes are for day time only. Evening and week-end minutes are always at a cost.

each plan has different costs for daytime minutes, evening minutes and weekend minutes.

Plan A

Daytime: 100 free minutes, then 15¢/minute Evening: 20¢/minute Weekend: 25¢/minute

Plan B

Daytime: 200 free minutes, then 20¢/minute Evening: 25¢/minute Weekend: 30¢/minute

Plan C

Daytime: 250 free minutes, then 30¢/minute Evening: 35¢/minute Weekend: 40¢/minute

Write a program that will input the number of each type of minutes and output the cheapest plan for this usage pattern, using the format shown below. The input will be in the order of daytime minutes, evening minutes and weekend minutes. Find cheapest price and print an appropriate message.