Answer to Question #15637 in C++ for iram
1.an elcetricty board charges the following for its users
1st 200 units,85 per units
for next 100 units,95 per units
beyond 300 units,RS1.5 per units
a minimum of RS 100 IS METER charge for all,
write a c program to evulate the bill amount in RS 5.
1
2012-10-02T07:27:51-0400
#include <string>
#include <iostream>
using namespace std;
int main()
{
float b;
cout<<"Enter the quantity of electricity:& ";
cin>>b;
if(b<200){
cout<<"RS: "<<b*0.85<<0<<"\n";
}
else if(b>200 && b<300){
cout<<"RS: "<<(b-200)*0.95+200*85<<"\n";
& }
& else if(b>300){
cout<<"RS: "<<200*0.85+100*0.95+(b-300)*1.5<<"\n";
& }
&
cout<<"\n\n";
system("PAUSE");
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment