You are on page 1of 1

//

//
//
//
//
//
//

main.cpp
Roommate's job
Created by Tyler Nicholson on 2/1/12.
Copyright (c) 2012 __MyCompanyName__. All rights reserved.

#include <iostream>
#include <string>
using namespace std;
int main (int argc, const char * argv[])
{
string users_name;
double base;
double tax_rate;
double taxes;
double paycheck;
cout << "Please enter your name." << endl;
cin >> users_name;
cout<< "\n";
cout << "Hello, " << users_name << ", please enter your base salary." << endl;
cin >> base;
cout << "\n";
cout << "Please enter your tax rate (as a decimal).\n";
cin >> tax_rate;
taxes = (base*tax_rate);
paycheck = (base - taxes);
cout << "Dear " << users_name << ", your taxes total is " << taxes << " so your
paycheck is " << paycheck << endl;

return 0;

You might also like