Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string>
- int main () {
- int age;//Age of Employee at time of severance//
- int FOS;//Number of complete years of service done by Employee by time of severance//
- char gender;//Is the Employee Male or Female (M/F)?//
- float salary;//How much the Employee earns per annum at the time of severance//
- float sevPay;//How much severance payment the Employee is entitled to//
- {
- printf ("Is the Employee Male or Female?\n");
- scanf ("%c"&gender);
- printf ("Please enter the Employee's Age (at the time of severance.\n");
- scanf ("%i",&age);
- printf ("Please enter the Employee's Annual Salary (at the time of severance).\n)";
- scanf ("%f",&salary);
- printf ("Please enter how many complete years of service the Employee has carried out by the time of severance?\n");
- scanf ("%i",&FOS);
- }
- if (gender =='M' && age >= 45) {
- sevPay=((salary/52)*2)* FOS;
- }
- if (gender=='M' && age <45) {
- sevPay=(salary/52)*FOS;
- }
- if (gender=='F' && age >= 40) {
- sevPay=((salary/52)*2)* FOS;
- }
- if (gender=='F' && age < 40) {
- sevPay= (salary/52)*FOS;
- }
- printf ("The Severance Payment the Employee is entitled to is £\n)";
- scanf ("%f"&sevPay);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement