. 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.
#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);
}
Comments
Leave a comment