[C++] Payment Calculator.... I made in 7 minutes 02-02-2013, 11:49 PM
#1
I just whipped this up to help me with some calculations for paying my Developers for a game I'm developing.
Code:
#include <iostream>
#include <string>
using namespace std;
double payhourrate;
int workhourday;
int workdayweek;
double paymentperday;
double paymentperweek;
double paymentpermonth;
double paymentperyear;
int main()
{
cout << "Welcome to Employee Payment Calculator" << endl;
cout << "To start, you will need to enter in all your Payment Information for your Employees" << endl;
submitpayhourrate:
cout << "Please Enter Your Hourly Pay Rate For Your Employee" << endl;
cin >> payhourrate;
cout << "Your Employee Is Payed About $";
cout << payhourrate;
cout << " An Hour." << endl;
cout << "Please Enter How Many Hours your Employee Works a Day" << endl;
cin >> workhourday;
cout << "Your Employee Works ";
cout << workhourday;
cout << " Hours a Day" << endl;
cout << "Please Enter How Many Days Your Employee Works a Week" << endl;
cin >> workdayweek;
cout << "Your Employee Works ";
cout << workdayweek;
cout << " Days A Week." << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
cout << " " << endl;
paymentperday = payhourrate * workhourday;
paymentperweek = paymentperday * workdayweek;
paymentpermonth = paymentperweek * 4;
paymentperyear = paymentpermonth * 12;
cout << "Your Employee Is Payed $";
cout << paymentperday;
cout << " Per Day At Work." << endl;
cout << "Your Employee Is Payed $";
cout << paymentperweek;
cout << " Per Week." << endl;
cout << "Your Employee Is Payed $";
cout << paymentpermonth;
cout << " Per Month." << endl;
cout << "Your Employee Is Payed $";
cout << paymentperyear;
cout << " Per Year." << endl;
cout << "Thank you for using Michael Ney's Job Payment Calculator.";
return 0;
}