fork download
  1. /*Madison County provides a $5,000 homeowner exemption for its senior citizens. For
  2. example, if a senior’s house is valued at $158,000 its assessed value would be $94,800,
  3. as explained above. However, he would only pay tax on $89,800. At last year’s tax
  4. rate of $2.64 for each $100 of assessed value, the property tax would be $2,370.72. In
  5. addition to the tax break, senior citizens are allowed to pay their property tax in four
  6. equal payments. The quarterly payment due on this property would be $592.68. Write
  7. a program that asks the user to input the actual value of a piece of property and the
  8. current tax rate for each $100 of assessed value.
  9.  -----The program should then calculate
  10. and report how much annual property tax a senior homeowner will be charged for this
  11. property and what the quarterly tax bill will be.
  12.  
  13. assessed value .60*
  14. -5000 pay tax on
  15. property tax ( divide by 100 then multiply by 2.64)
  16. annual property charge
  17. quarterly (divide by 4) /
  18. ADD COMMENTSS
  19.  
  20. #include "stdafx.h"
  21. #include <iomanip>
  22. #include <iostream>
  23. using namespace std;
  24.  
  25.  
  26. int _tmain(int argc, _TCHAR* argv[])
  27. {
  28.  
  29. /* This is psuedocode
  30. assessed value *.60
  31. -5000 pay tax on
  32. property tax ( divide by 100 then multiply by 2.64)
  33. annual property charge
  34. quarterly (divide by 4
  35. */
  36.  
  37. double amount; //The price the house is valued at
  38. double assessVal; //The assessed value
  39. double aValExemp; //The amount the house will actaully be taxed on with exemptions and the assessed value
  40. double propertyTax; //The tax rate
  41. double quarterlyTax; //The quarterly amount of the tax
  42.  
  43. cout << "Enter the amount the house is valued at (in dollars): " << endl;
  44. cin >> amount;
  45. assessVal = ( amount * .60 )
  46. cout << "The assessed value will be at: $" << assessVal;
  47. aValExemp = ( assessVal - 5000 )
  48. cout << "Minus the homeowner exemption of $5,000 the total assessed value will be: $" << aValExemp << endl;
  49. cout << "The current tax rate is 2.64 dollars per every 100 dollars of the total assessed value." << endl;
  50. propertyTax = ( ( aValExemp / 100) * 2.64 )
  51. cout << "The tax for the property will be: $" << propertyTax << endl;
  52. quarterlyTax = ( propertyTax / 4)
  53. cout << "The quarterly tax bill will come out to: $" << quarterlyTax <<endl;
  54.  
  55.  
  56.  
  57.  
  58. cout << setprecision(2) << fixed;
  59. cout << "The average rainfall for " << month1 << ", " << month2 << ", and " << month3 << " is " << average << endl;
  60.  
  61. }
  62.  
  63.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:43:2: error: 'cout' does not name a type
  cout << "Enter the amount the house is valued at (in dollars): " << endl;
  ^
prog.cpp:44:2: error: 'cin' does not name a type
  cin >> amount;
  ^
prog.cpp:45:2: error: 'assessVal' does not name a type
  assessVal = ( amount * .60 )
  ^
prog.cpp:47:2: error: 'aValExemp' does not name a type
  aValExemp = ( assessVal - 5000 )
  ^
prog.cpp:49:2: error: 'cout' does not name a type
  cout << "The current tax rate is 2.64 dollars per every 100 dollars of the total assessed value." << endl;
  ^
prog.cpp:50:2: error: 'propertyTax' does not name a type
  propertyTax = ( ( aValExemp / 100) * 2.64 )
  ^
prog.cpp:52:2: error: 'quarterlyTax' does not name a type
  quarterlyTax = ( propertyTax / 4)
  ^
prog.cpp:58:2: error: 'cout' does not name a type
  cout << setprecision(2) << fixed;
  ^
prog.cpp:59:2: error: 'cout' does not name a type
  cout << "The average rainfall for " << month1 << ", " << month2 << ", and " << month3 << " is " << average << endl;
  ^
prog.cpp:61:1: error: expected declaration before '}' token
 }
 ^
stdout
Standard output is empty