I WANT TO GET CODING C++ PROGRAMMING
WRITE A C PROGRAM THAT CALCULATE ELECTRICITY BILL WITH FOLLOWING CRITERIA
IF UNITS CONSUMED<300,UNITS*2
IF UNITS CONSUMED>300,<=500,UNITS*5
UNITS CONSUMED>500,UNITS*
LINE RENT 150........
THANKS
1
Expert's answer
2013-06-05T08:51:33-0400
#include <iostream> #include <conio.h>
using namespace std;
//main function int main() { float CONSUMED; cout<<"Enter CONSUMED: ";//input CONSUMED cin>>CONSUMED;//read CONSUMED if(CONSUMED<300){ CONSUMED*=2; } if(CONSUMED>300 && CONSUMED<=500 ){ CONSUMED*=5; } if(CONSUMED>500){ CONSUMED*=150; } //show result cout<<"You must pay $"<<CONSUMED;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment