Your cell phone provider bills you for minutes consumed per month. The billing rate per minute varies by time of day. The cell phone company rounds usage to the nearest N where N is dependent upon the time of day. Write a C# method based upon the following signature that calculates the amount owed for consumption at any point during the day.
public static double CalculateDollarsOwed(int minutesUsed, int roundingFactor, double billingRatePerMinute)
Sample input and output:
minutesUsed
roundingFactor
billingRatePerMinute
dollarsOwed
0
5
$0.10
$0.00
1
5
$0.10
$0.00
2
5
$0.10
$0.00
3
5
$0.10
$0.50
4
5
$0.10
$0.50
5
5
$0.10
$0.50
6
5
$0.10
$0.50
7
5
$0.10
$0.50
8
5
$0.10
$1.00
9
5
$0.10
$1.00
10
5
$0.10
$1.00
11
5
$0.10
$1.00
12
5
$0.10
$1.00
13
5
$0.10
$1.50