Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main() {
- cout << "Mt.Pleasant Bills" << endl;
- int month;
- int gallons;
- float sanitation;
- float bill;
- cout << "ENTER Month between 1 to 3: ";
- cin >> month;
- cout << "Month entered is: " << month << endl;
- if (month >= 1 & month <= 3 )
- {
- sanitation = month * 7.50;
- cout << "Sanitation Charge is: $" << sanitation << endl;
- cout << endl;
- //Get galons
- cout << "Enter Gallons used: " << endl;
- cin >> gallons;
- cout << endl;
- cout << "Gallons used is: " << gallons << endl;
- if (gallons < 1000)
- {
- cout << "Rate per gallon is $0.03 * Gallons used" << endl;
- cout << endl;
- bill = sanitation + (gallons * 0.03);
- cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
- cout << endl;
- cout << "BOOM PANES!";
- }
- else if (gallons >= 1000 & gallons <= 1999)
- {
- cout << "Rate per gallon is $30 + (Gallons used * $0.02)" << endl;
- cout << endl;
- bill = sanitation + 30 + (gallons * 0.02);
- cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
- cout << endl;
- cout << "BOOM PANES!";
- }
- else
- {
- cout << "Rate per gallon is $50 + (Gallons used * $0.015)" << endl;
- cout << endl;
- bill = sanitation + 50 + (gallons * 0.015);
- cout << "Your Total Sewer and Water Charge is: $" << bill << endl;
- cout << endl;
- cout << "BOOM PANES!";
- }
- }
- else
- {
- cout << "Not a valid month please try again!";
- }
- system("pause>0");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement