Answer to Question #272868 in C++ for affan

Question #272868

. Write a C++ program which takes electric units consumed and rate per unit as input

from user. Also take general sales tax (%), tv license fee and bank charges as input.

Calculate total payable amount for user and display on screen both Total amount

payable and amount without gst, bank Fee and tv fee.


1
Expert's answer
2021-11-28T23:59:57-0500
#include<iostream>
using namespace std;
int main(){
	cout<<"Enter electric units consumed and rate per unit \n";
	int units;
	int rate;
	cin>>units>>rate;
	cout<<"Enter general sales tax (%), tv license fee and bank charges \n";
	int tax,fee,charges;
	cin>>tax;
	cin>>fee;
	cin>>charges;
	int amount = tax + fee+ charges;
	cout<<"Amount payable is :"<<units * rate - amount<<endl;
	cout<<"Amount without gst, bank Fee and tv fee is:  "<<(units * rate);
}

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS