Computer Science, asked by warsiaman2124, 3 months ago

Create a program that will compute the electric bill of a person given the following ranges

Answers

Answered by ғɪɴɴвαłσℜ
3

\sf{\huge{\underline{\pink{Programme :-}}}}

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;

}

\sf{\huge{\underline{\green{Result :-}}}}

Rs.25000

Similar questions