/*****************************************************
Name: To calculate custmer's bill
Copyright: open source
Author: Muhammad Hussnain Imtiaz
Date: 20/12/11 12:55
******************************************************/
# include <iostream>
# include <conio.h>
using namespace std ;
int main ()
{
double unitPriceTV = 400.00 ,
unitPriceDVDPalyer = 300.00 ,
unitPriceRemoteController = 35.20 ,
unitPriceCDPlayer = 220.00 ,
unitPriceTapeRecoder = 150.00 ,
sum1 = 0.0 ,
sum2 = 0.0 ,
;
int noOfTV =0 ,
noOfDVDPalyer =0 ,
noOfRemoteController=0 ,
noOfCDPlayer =0 ,
noOfTapeRecoder =0 ,
;
cout << " Please Enter The number of TV : " ;
cin >> unitPriceTV ;
cout << " Please Enter The number of DVD Palyer : " ;
cin >> noOfDVDPalyer ;
cout << " Please Enter The number of Remote Controller : " ;
cin >> noOfCDPlayer ;
cout << " Please Enter The number of CD Player : " ;
cin >> noOfCDPlayer ;
cout << " Please Enter The number of Tape Recoder : " ;
cin >> noOfTapeRecoder ;
sum1 = (unitPriceTV * noOfTV) + (unitPriceDVDPalyer * noOfDVDPalyer) + (unitPriceRemoteController * noOfRemoteController) + (unitPriceCDPlayer * noOfCDPlayer) + (unitPriceTapeRecoder * noOfTapeRecoder) ;
cout << " \n Your bill with out tax is : " << sum1 << "$";
sum2 = (sum1 / 100.00) * 8.25 + sum1 ;
cout << " \n\n We add 8.25% sales tax " ;
cout << " \n Your bill including tax is : " << sum2 << "$";
cout << " \n\n .................Thanks................." ;
cout << " \n\n\n\n\n\n\n\n\n\n Created By : Mohammad Hussnain Imtiaz " ;
getch () ;
return 0 ;
}
No comments:
Post a Comment