In: Computer Science
Suppose a county tax collector collects property taxes on the assessed value of each piece of property in their county. Here are the tax collector's rules for taxes: Assessed value is calculated at the rate of 75% of the property's actual value. Homeowners who live at their property are provided with a $10,000 homeowner exception that further reduces their assessed value below the 75% level. Homeowners are allowed to be billed in quarterly installments if they live at their property. In the current year, suppose the property tax rate is $18.90 for each $1000 of assessed value. Write a program that prompts for a property's actual value and whether it is owner-occupied for the homeowner's exception. Based on this information, calculate and display the assessed value, the tax owed and what each quarterly tax bill would be (if owner-occupied). The program dialogue is shown below. In order to receive full credit, you must declare one or more const values and use a loop. The round()function provided by math.hmay be useful. Include it with #include. Each iteration of the loop will process three inputs: Property value Homeowner exception Whether or not to continue the loop What is the property's actual value: 100000 Does the homeowner's exception apply (1=yes, 0=no): 0 Assessed value is: $75000.00 Property tax owed is: $1417.50 Quarterly tax option not available Do you want to continue [1=yes, 0=no]: 1 What is the property's actual value: 100000 Does the homeowner's exception apply (1=yes, 0=no): 1 Assessed value is: $65000.00 Property tax owed is: $1228.50 Quarterly tax owed is: $307.13 Do you want to continue [1=yes, 0=no]: 1 What is the property's actual value: 158000 Does the homeowner's exception apply (1=yes, 0=no): 1 Assessed value is: $108500 Property tax owed is: $2050.65 Quarterly tax owed is: $512.66 Do you want to continue [1=yes, 0=no]: 1 What is the property's actual value: 158000 Does the homeowner's exception apply (1=yes, 0=no): 0 Assessed value is: $118500.00 Property tax owed is: $2239.65 Quarterly tax option not available Do you want to continue [1=yes, 0=no]: 0
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const double rate=.75;
const double rate2=18.90;
const double exception = 10000;
double assessed,tax,exemption,actual;
int ho,choice;
do
{
cout<<"What is the property's actual value: ";
cin>>actual;
cout<<"Does the homeowner's exception apply (1=yes, 0=no):
";
cin>>ho;
assessed=actual*rate;
if(ho)
assessed-=exception;
tax=assessed/1000.*18.90;
cout<<"Assessed value is
$"<<assessed<<endl;
cout<<"Property tax owed is:
$"<<setprecision(2)<<fixed<<tax<<endl;
if(ho==0)
cout<<"Quarterly tax option not
available\n\n";
else
cout<<"Quarterly tax owed is:
$"<<tax/4.<<endl<<endl;
cout<<"Do you want to continue [1=yes, 0=no]: ";
cin>>choice;
}while(choice==1);
system("pause");
return 0;
}