So I have a basic assignment...
Code:
// File: program2.cpp
// Author: Name
// Course: CSC 135
// Date: September 25, 2013
// Purpose: The program will ask for the number of acres and actual property value per acre. It will calculate total actual value, assessment value and the property tax.
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
const double TAXRATE = .064;
int main()
{
int acresOwned;
double valuePerAcre, totalValue, assmntValue, propTax;
// Inputs
cout << "Enter the number of acres owned: ";
cin >> acresOwned;
cout << "Enter the actual value per acre: ";
cin >> valuePerAcre;
// Calculations
totalValue = valuePerAcre * acresOwned;
assmntValue = totalValue * .60;
propTax = assmntValue / 100 * TAXRATE;
// Outputs
cout << endl;
cout << setw(8) << fixed << setprecision(2) << endl;
cout << "Acres owned: " << acresOwned << endl;
cout << "Total actual value: $ " << totalValue << endl;
cout << "Assessment value: $ " << assmntValue << endl;
cout << "Property tax: $ " << propTax << endl;
return 0;
}
I'm curious if anyone knows how I can line up the outputs to their decimals? the current setw and setprecision arn't doing anything.