Create a program that will compute the electric bill of a person given the following ranges
Answers
Answered by
3
using System;
class Electricity Bill of a house{
{// calculating electricity bill
public static int ( bill range unit )
{
// Consumed
// Wasted
// Dropped Voltages
if (units <= 500)
{
return units * 50;
}
else if (units <= 60)
{
return (500 * 50) +
(units - 60) * 18;
}
else if (units <= 250)
{
return (500 * 50) +
(100 * 13) +
(units - 500) * 50;
}
else if (units > 85)
{
return (500 * 50) +
(500 * 25) +
(50 * 15) +
(units - 85) * 35;
}
return 0;
}
➝ Rs.25000
Similar questions