Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //payroll calculator by Efe Ertas
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main ()
- {
- float wage;
- float hour;
- float netpay;
- float grosspay;
- cout << "---------------WELCOME TO PAYROL CALCULATOR---------------" << endl;
- cout << " " << endl;
- //get the hourly wage from the user
- cout << "Please enter your hourly wage: " << endl;
- cin >> wage;
- //get the number of hours
- cout << "Please enter the hours you worked: " << endl;
- cin>> hour;
- //calculate the grosspay
- grosspay = (wage*hour);
- cout << "Your gross pay is " << grosspay << endl;
- //calculate netpay
- netpay = (grosspay)-(grosspay/100)*(15);
- cout << "Your net pay is " << netpay << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement