64 609
Assignments Done
99,1%
Successfully Done
In September 2018

Answer to Question #4879 in C++ for zuhaib abbasi

Question #4879
write a program to calculate elecricity bill.
if the units consumed are equal or less 100 then the cost of per unit is 4.540,if units consumed are more than 100 then the cost is 6.860 per units
Expert's answer

#include <iostream.h>
#include <conio.h>
float U,P;
main(){
cout<<"Enter units consumed:"
cin>>U;
if (U<=100) P=U*4.540;
if (U>=100) P=U*6.860;
cout<<"Price of consumed units is "<<P;
getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions