Advertisement
Guest User

aaaaa

a guest
Sep 21st, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4. int main() {
  5. cout << "Mt.Pleasant Bills" << endl;
  6. int month;
  7. int gallons;
  8. float sanitation;
  9. float bill;
  10. cout << "ENTER Month between 1 to 3: ";
  11. cin >> month;
  12. cout << "Month entered is: " << month << endl;
  13. if (month >= 1 & month <= 3 )
  14. {
  15. sanitation = month * 7.50;
  16. cout << "Sanitation Charge is: $" << sanitation << endl;
  17. cout << endl;
  18. //Get galons
  19. cout << "Enter Gallons used: " << endl;
  20. cin >> gallons;
  21. cout << endl;
  22. cout << "Gallons used is: " << gallons << endl;
  23. if (gallons < 1000)
  24. {
  25. cout << "Rate per gallon is $0.03 * Gallons used" << endl;
  26. cout << endl;
  27. bill = sanitation + (gallons * 0.03);
  28. cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
  29. cout << endl;
  30. cout << "BOOM PANES!";
  31. }
  32. else if (gallons >= 1000 & gallons <= 1999)
  33. {
  34. cout << "Rate per gallon is $30 + (Gallons used * $0.02)" << endl;
  35. cout << endl;
  36. bill = sanitation + 30 + (gallons * 0.02);
  37. cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
  38. cout << endl;
  39. cout << "BOOM PANES!";
  40. }
  41. else
  42. {
  43. cout << "Rate per gallon is $50 + (Gallons used * $0.015)" << endl;
  44. cout << endl;
  45. bill = sanitation + 50 + (gallons * 0.015);
  46. cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
  47. cout << endl;
  48. cout << "BOOM PANES!";
  49. }
  50. }
  51. else
  52. {
  53. cout << "Not a valid month please try again!";
  54. }
  55. system("pause>0");
  56. return 0;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement