Advertisement
sawahbear24

Untitled

Oct 24th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #include <iostream>
  2. int main()
  3. {
  4. int custid, lastwm, newwm, ssp, wused;
  5. float dis, tax, due,charge;
  6. charge=8.00;
  7. std::cout<< "Enter Customer Identification Number: " << std::endl;
  8. std::cin>> custid;
  9. cout<< "Enter the Last Reading of the Water Meter:" << endl;
  10. cin>> lastwm >> endl;
  11. cout<< "Enter the New Reading of the Water Meter:" << endl;
  12. cin>> newwm >> endl;
  13. cout<< "Is the customer in the Super Savings Plan?" << endl << "/tEnter '1' for YES or '0' for NO" << endl;
  14. cin>> ssp >>endl;
  15. wused=newwm-lastwm;
  16. if (wused<200)
  17. charge=charge+(wused*0.08);
  18. else if (wused<800)
  19. charge=charge+(wused*0.07);
  20. else if (wused>=800)
  21. charge=charge+(wused*0.05);
  22. if (ssp==1)
  23. charge=charge+6;
  24. if (charge>35 && ssp==1)
  25. charge=charge+(charge*.2);
  26. tax=charge*.06;
  27. due=(int)((charge+tax)*100+0.5)/100;
  28. cout<< "Customer ID: " << custid << endl << "/tMember of Super Saver: ";
  29. if (ssp==1)
  30. cout<< "Yes" << endl;
  31. else
  32. cout<< "No" << endl;
  33. cout<< "/tLast Reading of Water Meter: " << lastwm << endl << "/tNew Reading of Water Meter: " << newwm << endl
  34. << "/tUnits of Water Used: "<<wused<<endl<<"/tCharges: " << charge << endl << "/tTax: " << tax << endl << "/tAmount Due: " << due << endl;
  35. system("PAUSE");
  36. return EXIT_SUCCESS;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement