I have written this javascript program for all the people who keep eye on every expense
Copy paste this code in notepad or any text editor and put extension as .html
And as u open open after saving you'll find a pop up window asking for units .u can see the unit behind ur reliance energy bill above the table.
Thank U.
<html>
<head>
<title>
Electricity Bill Calculator
</title>
</head>
<body>
<script language="javascript">
{
var u,fc,ec,wc,rac,fac,ged,a,tax,bill;
u=prompt("Units:"," ")
if(u<100)
{
fc=40;
ec=2.11*u;
wc=1.24*u;
rac=0.57*u;
fac=0.7515*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>100 && u<300)
{
fc=75;
ec=3.58*u;
wc=1.24*u;
rac=0.74*u;
fac=1.1120*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>300 && u<500)
{
fc=75;
ec=4.36*u;
wc=1.24*u;
rac=0.86*u;
fac=1.2920*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>500)
{
fc=100;
ec=6.36*u;
wc=1.24*u;
rac=1.17*u;
fac=1.6844*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
}
</script>
</body>
</html>
Copy paste this code in notepad or any text editor and put extension as .html
And as u open open after saving you'll find a pop up window asking for units .u can see the unit behind ur reliance energy bill above the table.
Thank U.
<html>
<head>
<title>
Electricity Bill Calculator
</title>
</head>
<body>
<script language="javascript">
{
var u,fc,ec,wc,rac,fac,ged,a,tax,bill;
u=prompt("Units:"," ")
if(u<100)
{
fc=40;
ec=2.11*u;
wc=1.24*u;
rac=0.57*u;
fac=0.7515*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>100 && u<300)
{
fc=75;
ec=3.58*u;
wc=1.24*u;
rac=0.74*u;
fac=1.1120*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>300 && u<500)
{
fc=75;
ec=4.36*u;
wc=1.24*u;
rac=0.86*u;
fac=1.2920*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
else if(u>500)
{
fc=100;
ec=6.36*u;
wc=1.24*u;
rac=1.17*u;
fac=1.6844*u;
a=fc+ec+wc+rac+fac;
ged=a*15/100;
tax=0.15*u;
bill=fc+ec+wc+rac+fac+ged+tax;
document.write("Current Bill Amount: "+bill+"<br>");
}
}
</script>
</body>
</html>
No comments:
Post a Comment