Question: create a program that will calculate the expenses for a homeowner to include the electric, rent, and water bill. The program will provide the user
create a program that will calculate the expenses for a homeowner to include the electric, rent, and water bill. The program will provide the user with formatted output that they might use for a printable report each month for their records.
Name of Month
Electric bill amount
Rent Amount
Water bill amount
Format the output such that the items are left-aligned and the amounts are right-aligned as shown below. Be sure to format the currency properly.
Input | Process | Output |
|---|---|---|
Name of Month Rent Amount Electric bill amount Water bill amount | Total expenses for the month | Name of month Each item is Identified and displayed (Item left aligned, amount right aligned) Total for all three services for the month |
Example program Run:

Please Enter The Month: March Please Enter your Rent Amount: 1250 Please Enter your Electric Bill: 56.23 Please Enter your Water Bill: 28.21 Your monthly expenses for March Rent: $1250.00 Electric: Water: $ 56.23 $ 28.21 Total: $1334.44 Program ended with exit code: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
