Programming Challenge Chapter 3 – Q #14 Senior Citizen Property Tax – Tony Gaddis – Starting Out With C++

 

Programming Challenge Chapter 3 – Q #14  Senior Citizen Property Tax – Tony Gaddis – Starting Out With C++


Problem: -

Madison County provides a $5,000 homeowner exemption for its senior citizens. For example, if a senior s house is valued at $158,000 its assessed value would be $94,800, as explained above. However, he would only pay tax on $89,800. At last year s tax rate of $2.64 for each $100 of assessed value, the property tax would be $2,370.72. In addition to the tax break, senior citizens are allowed to pay their property tax in four equal payments. The quarterly payment due on this property would be $592.68. Write a program that asks the user to input the actual value of a piece of property and the current tax rate for each $100 of assessed value. The program should then calculate and report how much annual property tax a senior homeowner will be charged for this property and what the quarterly tax bill will be.

Solution: -

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

      float const ASSESSMENT_PER = 0.60;

 

      float actual_value, tax_rate;

      float quater_tax_bill = 0.0, total_property_tax = 0.0;

 

      cout << "What is The Accual Value Of Property?: ";

      cin >> actual_value;

      cout << "What is The Current Tax Rate Per $100: ";

      cin >> tax_rate;

 

      total_property_tax = (((actual_value * ASSESSMENT_PER) - 5000) / 100.0) * tax_rate;

      quater_tax_bill = total_property_tax / 4.0;

 

 

      cout << setprecision(2) << showpoint << fixed;

      cout << "Property Value              $" << setw(10) << actual_value << endl;

      cout << "Total Property Tax is       $" << setw(10) << total_property_tax << endl;

      cout << "Quarter Tax Bill is         $" << setw(10) << quater_tax_bill << endl;

 

      return 0;

}

This is the solution of this question




OUTPUT OF THIS QUESTION 

Input is highlighted with yellow color.


Explanation of this Solution

  1. Declare a float constant and initialize given values.
  2. Declare two float variables for input.
  3. Declare another two float variable for calculation.
  4. Take input one by one from the user by using cin.
  5. Calculate the values by using given values.
  6. Use set precision according to question requirement 
  7.  In last, display output on the screen in a pattern.
  8. Return 0 to the main function.

Also, I attach CPP file of this problem. You can download this file

Click Here to Download This File


Post a Comment

0 Comments