Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[C++] Payment Calculator.... I made in 7 minutes filter_list
Author
Message
[C++] Payment Calculator.... I made in 7 minutes #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;
}

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #2
You have the closing tag for the Code box twice. Besides that good share.

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #3
(02-03-2013, 12:48 AM)Kinanizer Wrote: You have the closing tag for the Code box twice. Besides that good share.

Thanks for letting me know. Fixed it.

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #4
I hope to god this is a troll, if you need a program to help calculate how much you should pay out to employees, one, you should be using a database, not manual user input at every step of the way, and two, if you're going to have it so you have to input every damn variable one-by-one, at least have a loop so you don't need to restart the program a dozen times.

Oh, and this isn't related to your programming, but why on earth don't you have it automatically calculated and paid out if you are heading up any kind of game development project?

And why would you include your name after previously saying you "have 10k+ Connections" on your botnet?


All together, I call bullshit on basically everything you've said.

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #5
w00t has a few good points/suggestions/points of criticism. May want to take some of them into consideration.
[Image: 7uhCgFS.jpg?1]

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #6
(02-03-2013, 08:50 AM)w00t Wrote: I hope to god this is a troll, if you need a program to help calculate how much you should pay out to employees, one, you should be using a database, not manual user input at every step of the way, and two, if you're going to have it so you have to input every damn variable one-by-one, at least have a loop so you don't need to restart the program a dozen times.

Oh, and this isn't related to your programming, but why on earth don't you have it automatically calculated and paid out if you are heading up any kind of game development project?

And why would you include your name after previously saying you "have 10k+ Connections" on your botnet?


All together, I call bullshit on basically everything you've said.

Not my real name. I'm not that retarded.

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #7
There's quite a few faults in this code. For example, there's far too many white spaces (blank lines) and also, at the end, there's nothing to stop the program from closing, so you wont get enough time to even read what the text says at the end. But still, it's a good job, nice work!
[Image: F4Z9Dqw.png]

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #8
(02-04-2013, 12:33 AM)BreShiE Wrote: There's quite a few faults in this code. For example, there's far too many white spaces (blank lines) and also, at the end, there's nothing to stop the program from closing, so you wont get enough time to even read what the text says at the end. But still, it's a good job, nice work!

Well it doesn't automatically close, until you hit a key. In a month this is going to be a good program. Sorry for my bad c++ Practices.

Reply

RE: [C++] Payment Calculator.... I made in 7 minutes #9
Does it not? I see no possible way it could stay open though?
[Image: F4Z9Dqw.png]

Reply







Users browsing this thread: 1 Guest(s)