The Electricity board charges according to the following rates:
For the first 100 units – 40 P per unit ( P -> Paise)
For the next 200 units – 50 P per unit
Beyond 300 units – 60 P per unit
All users are charged meter charge also which is Rs. 50/-
void main()
{
int unit;
float charge;
cout << “\n Enter the no. of units , Electricity Consumed :”;
cin >> unit;
if (unit <= 100 )
charge = 50.0 + 0.4 * unit;
else if(unit<=300)
charge = 50.0 +4.0 * 100 + 0.5 * (unit – 100);
else
charge = 50.0 + 4.0 *100 + 0.5 * 200 + 0.6 *( unit – 300) ;
cout << “n The charges is Rs. “ << charge;
getch();
}
"The best way to cheer yourself up is to try to cheer somebody else up." Mark Twain
Subscribe to:
Post Comments (Atom)
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.
Full Web Building Tutorials
Execellent Free Tutorials for VB, HTML, PHP, FLASH, Computer Hardware
Now Playing: Ballade Pour Adeline
Free Music Downloads | Free ringtones at EZ-Tracks.com
About Me
- Rinka
- I m an IT lecturer of a college. I love social-work. I want to do something beneficial for society before dying , that can promote our society, to some extent.
plz chk ur mail @ sun.rinka08@gmail.com
ReplyDeletei have sent a mail
anurag
dps rbp