0% found this document useful (0 votes)
11 views2 pages

Customer Billing Calculation Program

The document is a C++ program that calculates the total due for customers based on their account type and services used. It prompts the user for their account number, customer code, and the number of premium channels and basic service connections. The program then computes the total due based on predefined rates and displays the result, handling invalid customer codes appropriately.

Uploaded by

Kamariani Tapah
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Customer Billing Calculation Program

The document is a C++ program that calculates the total due for customers based on their account type and services used. It prompts the user for their account number, customer code, and the number of premium channels and basic service connections. The program then computes the total due based on predefined rates and displays the result, handling invalid customer codes appropriately.

Uploaded by

Kamariani Tapah
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#include <iostream>

using namespace std;


int main()

{
char cc;
int nopc,nobsc;
double due;
float an;
const double r_b_proc_f=4.50,r_b_serv_c=20.50,r_c_prem_c=7.50,
b_b_proc_f=15.00,b_b_serv_c=75.00,b_b_conn_c=5.00,b_c_prem_c=50.00;

cout<<"Customer account number is : ";


cin>>an;
cout<<endl;
cout<<"Customer code : ";
cin>>cc;
cout<<endl;

if (cc=='R' || cc=='r')

{ cout<<"Number of premium channels : ";


cin>>nopc;
cout<<endl;
due=(r_b_proc_f+r_b_serv_c+nopc)*r_c_prem_c;
cout<<"Total due is : "<<due<<endl;
cout<<"Account number is : "<<an<<endl;
}
else if (cc=='B' || cc=='b')

{ cout<<"Number of premium channels : ";


cin>>nopc;
cout<<endl;
cout<<"Number of basic service connection : ";
cin>>nobsc;
cout<<endl;

if (nobsc<=10)
{ due=(b_b_proc_f+b_b_serv_c+nopc)*b_c_prem_c;
cout<<"Total due is : "<<due<<endl;
cout<<"Account number is : "<<an<<endl;
}
else

{ due=(b_b_proc_f+b_b_serv_c)+((nobsc-10)*b_b_conn_c)
+(nopc*b_c_prem_c);
cout<<"Total due is : "<<due<<endl;
cout<<"Account number is : "<<an<<endl;
}
}

else
{
cout<<"Invalid customer code"<<endl;
}
system("pause");
return 0;
}

You might also like