In: Computer Science
Solve this problem in C.
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:
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.h may be useful. Include it with #include<math.h>.
Each iteration of the loop will process three inputs:
#include <stdio.h>
void main()
{
char chContinue;
do
{
double propVal;
char cHouseOwnerExcept;
printf("Please Enter Property Value\n");
scanf("%lf",&propVal);
printf("HomeOwner Exception is Applicable(y/n)\n");
scanf("%c",&cHouseOwnerExcept);
printf("Do you Want to Continue(y/n)\n");
scanf("%c",&chContinue);
double accessedVal = (0.75 * propVal);
printf("\nAccessed Value : %lf",accessedVal);
if(cHouseOwnerExcept == 'y')
{
printf("\nTax Owed : %lf",((accessedVal - 10000) * 18.90));
printf("\nQuarterly Bill : %lf",((accessedVal - 10000) *
18.90)/4);
}
else
{
printf("\nTax Owed : %lf",(accessedVal * 18.90));
}
} while (chContinue == 'y');
}