"electricity bill program inc#" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "electricity bill program inc#" answered properly. Developers are finding an appropriate answer about electricity bill program inc# related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like electricity bill program inc#. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on electricity bill program inc#.
electricity bill program inc#
/**
* C program to calculate total electricity bill
*/
#include <stdio.h>
int main()
{
int unit;
float amt, total_amt, sur_charge;
/* Input unit consumed from user */
printf("Enter total units consumed: ");
scanf("%d", &unit);
/* Calculate electricity bill according to given conditions */
if(unit <= 50)
{
amt = unit * 0.50;
}
else if(unit <= 150)
{
amt = 25 + ((unit-50) * 0.75);
}
else if(unit <= 250)
{
amt = 100 + ((unit-150) * 1.20);
}
else
{
amt = 220 + ((unit-250) * 1.50);
}
/*
* Calculate total electricity bill
* after adding surcharge
*/
sur_charge = amt * 0.20;
total_amt = amt + sur_charge;
printf("Electricity Bill = Rs. %.2f", total_amt);
return 0;
}
Source: codeforwin.org
All those coders who are working on the Whatever based application and are stuck on electricity bill program inc# can get a collection of related answers to their query. Programmers need to enter their query on electricity bill program inc# related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about electricity bill program inc# for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of electricity bill program inc# while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "electricity bill program inc#". Visit this developer's friendly online web community, CodeProZone, and get your queries like electricity bill program inc# resolved professionally and stay updated to the latest Whatever updates.