Write two electricity billing program in Java according to the following:
a. simple program using variables
b. a program with if else statements.
amannishad plz do this.
Answers
Answer:
Java program to calculate Electricity bill. If you wondering on how to calculate Electricity bill by writing the Java program there you go. Here we share the list of code with sample outputs, in five different ways using static values, using function or method, using command line arguments, do while, for loop, user define method along with sample outputs for each program.
Q. how to calculate electricity bill?
Consider the following example:
For example, a consumer consumes 500 watts per hour daily for one month. Calculate the total energy bill of that consumer if per unit rate is 7? ( In $, £, €, INR, DHR, Riyal etc) [Take 1 month = 30 Days].
Solution :
electricity bill java code
s we know that 1 Unit = 1kWh
So total kWh = 500 watts x 24 hours x 30 days
= 360000
So, we want to convert into units:
Where 1 unit = 1kWh
Total consumed units are as 360000/1000 = 360
And, cost per unit is = 7, the total cost of the electricity bill is 360 x 7 = 2520( In $, £, €, INR, Rs, DHR, Riyal etc).
#followme
#markasbrainlist
....
Answer:
Java prograam is to count electricity bills
Q. how to calculate electricity bill?
Consider the following example:
For example, a consumer consumes 500 watts per hour daily for one month. Calculate the total energy bill of that consumer if per unit rate is 7? ( In $, £, €, INR, DHR, Riyal etc) [Take 1 month = 30 Days].
Explanation:
❤❤❤