fork download
  1. // Nicolas Ruano CS1A Chapter 3, Pp. 144 #10
  2. /******************************************************************************
  3. *******************************************************************************/
  4. #include <iostream>
  5. #include <iomanip>
  6. using namespace std;
  7.  
  8. int main() {
  9. double actualValue, assessmentValue, propertyTax;
  10.  
  11. // Ask user for actual property value
  12. cout << "Enter the actual value of the property: $";
  13. cin >> actualValue;
  14.  
  15. // Calculate assessment value (60% of actual)
  16. assessmentValue = actualValue * 0.60;
  17.  
  18. // Calculate property tax ($0.64 per $100 = 0.0064 per $1)
  19. propertyTax = assessmentValue * 0.0064;
  20.  
  21. // Display results
  22. cout << fixed << setprecision(2);
  23. cout << "\nAssessment value: $" << assessmentValue << endl;
  24. cout << "Property tax: $" << propertyTax << endl;
  25.  
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0.01s 5308KB
stdin
Standard input is empty
stdout
Enter the actual value of the property: $
Assessment value: $0.00
Property tax:     $0.00