0

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

3
Contributors
2
Replies
4
Views
11 Years
Discussion Span
Last Post by alc6379
0

I'm sorry (not really), but the best way to get your butt ignored is to copy and paste your homework like that. It implies that you think we're obligated to do everything for you, which we aren't. That's very presumptuous and incredibly rude.

0

I'm sorry (not really), but the best way to get your butt ignored is to copy and paste your homework like that. It implies that you think we're obligated to do everything for you, which we aren't. That's very presumptuous and incredibly rude.

I concur.

I think it's rude enough that I'm going to close the thread. Please read the notices posted at the top of the forum regarding asking homework questions. Refine your question to conform to those guidelines, and repost.

Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.