Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float salary, serviceYears, salaryIncrease, salaryIncreasePercent, oldSalary, newSalary;
- cout << "Input \n" << endl;
- cout << "Enter Salary: ";
- cin >> salary;
- cout << "Years of Service: ";
- cin >> serviceYears;
- system("cls");
- if (serviceYears <= 2)
- {
- cout << "Output \n" << endl;
- salaryIncreasePercent = 0;
- cout << "Salary: " << salary << " Pesos"<< endl;
- cout << "Years of Service: " << serviceYears << " Years"<< endl;
- salaryIncrease = salary * salaryIncreasePercent;
- cout << "Salary Increase: " << salaryIncrease << " Pesos"<< endl;
- cout << endl;
- oldSalary = salary;
- cout << "Old Salary: " << oldSalary << " Pesos"<< endl;
- newSalary = oldSalary + salaryIncrease;
- cout << "New Salary: " << newSalary << " Pesos"<< endl;
- }
- else if (serviceYears <= 5)
- {
- cout << "Output \n" << endl;
- salaryIncreasePercent = 0.05;
- cout << "Salary: " << salary << " Pesos"<< endl;
- cout << "Years of Service: " << serviceYears << " Years"<< endl;
- salaryIncrease = salary * salaryIncreasePercent;
- cout << "Salary Increase: " << salaryIncrease << " Pesos"<< endl;
- cout << endl;
- oldSalary = salary;
- cout << "Old Salary: " << oldSalary << " Pesos"<< endl;
- newSalary = oldSalary + salaryIncrease;
- cout << "New Salary: " << newSalary << " Pesos"<< endl;
- }
- else if (serviceYears <= 10)
- {
- cout << "Output \n" << endl;
- salaryIncreasePercent = 0.10;
- cout << "Salary: " << salary << " Pesos"<< endl;
- cout << "Years of Service: " << serviceYears << " Years"<< endl;
- salaryIncrease = salary * salaryIncreasePercent;
- cout << "Salary Increase: " << salaryIncrease << " Pesos"<< endl;
- cout << endl;
- oldSalary = salary;
- cout << "Old Salary: " << oldSalary << " Pesos"<< endl;
- newSalary = oldSalary + salaryIncrease;
- cout << "New Salary: " << newSalary << " Pesos"<< endl;
- }
- else if (serviceYears <= 15)
- {
- cout << "Output \n" << endl;
- salaryIncreasePercent = 0.15;
- cout << "Salary: " << salary << " Pesos"<< endl;
- cout << "Years of Service: " << serviceYears << " Years"<< endl;
- salaryIncrease = salary * salaryIncreasePercent;
- cout << "Salary Increase: " << salaryIncrease << " Pesos"<< endl;
- cout << endl;
- oldSalary = salary;
- cout << "Old Salary: " << oldSalary << " Pesos"<< endl;
- newSalary = oldSalary + salaryIncrease;
- cout << "New Salary: " << newSalary << " Pesos"<< endl;
- }
- else if (serviceYears <= 20)
- {
- cout << "Output \n" << endl;
- salaryIncreasePercent = 0.20;
- cout << "Salary: " << salary << " Pesos"<< endl;
- cout << "Years of Service: " << serviceYears << " Years"<< endl;
- salaryIncrease = salary * salaryIncreasePercent;
- cout << "Salary Increase: " << salaryIncrease << " Pesos"<< endl;
- cout << endl;
- oldSalary = salary;
- cout << "Old Salary: " << oldSalary << " Pesos"<< endl;
- newSalary = oldSalary + salaryIncrease;
- cout << "New Salary: " << newSalary << " Pesos"<< endl;
- }
- else
- {
- cout << "OUT OF SERVICE";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement