Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int custid, lastwm, newwm, ssp, wused;
- float dis, tax, due,charge;
- charge=8.00;
- std::cout<< "Enter Customer Identification Number: " << std::endl;
- std::cin>> custid;
- cout<< "Enter the Last Reading of the Water Meter:" << endl;
- cin>> lastwm >> endl;
- cout<< "Enter the New Reading of the Water Meter:" << endl;
- cin>> newwm >> endl;
- cout<< "Is the customer in the Super Savings Plan?" << endl << "/tEnter '1' for YES or '0' for NO" << endl;
- cin>> ssp >>endl;
- wused=newwm-lastwm;
- if (wused<200)
- charge=charge+(wused*0.08);
- else if (wused<800)
- charge=charge+(wused*0.07);
- else if (wused>=800)
- charge=charge+(wused*0.05);
- if (ssp==1)
- charge=charge+6;
- if (charge>35 && ssp==1)
- charge=charge+(charge*.2);
- tax=charge*.06;
- due=(int)((charge+tax)*100+0.5)/100;
- cout<< "Customer ID: " << custid << endl << "/tMember of Super Saver: ";
- if (ssp==1)
- cout<< "Yes" << endl;
- else
- cout<< "No" << endl;
- cout<< "/tLast Reading of Water Meter: " << lastwm << endl << "/tNew Reading of Water Meter: " << newwm << endl
- << "/tUnits of Water Used: "<<wused<<endl<<"/tCharges: " << charge << endl << "/tTax: " << tax << endl << "/tAmount Due: " << due << endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement