Write the pseudocode for the following: A company needs to print pay-slips for its employees. Each record contains the following: a. number, b. name, c. hours, d. gender, and e. code. Each employee’s gross pay must be calculated and deductions made on the following basis: CODE 1: Full-time employee: Rate R30 per hour Deductions: Men PAYE 15% of gross pay, Medical aid R200 Women PAYE 10% of gross pay Medical aid R100 CODE 2: Part-time employee: Rate R20 per hour Deductions: Men PAYE 10% of gross pay Women PAYE 5% of gross pay No medical aid for this category. Print out a pay-slip for each employee, showing all the employee details, gross pay, all the deductions, and the net pay. Processing continues until a number of zero is entered. Then print out: The total number of men who work full time. The total PAYE paid by women. The total amount paid out by the company to all its employees.
// Pseudocode for calculating the pay slip of the employees of a
company
Declaration
number emp_num;
string name;
number hours;
string gender;
number code;
number totalFullMen;
number totalPayWomen;
number total;
number gross_pay;
number deduction;
number net_pay;
Start
// initialize totalFullMen, totalPayWomen and total to
0
totalFullMen = 0;
totalPayWomen = 0;
total = 0;
print("Name Hours Gender Gross Pay Deduction Net
Pay");
// input employee number
input emp_num;
// check if employee number is non-zero
while emp_num != 0
do
// input employee code, name ,
hours and gender
input code, name, hours,
gender;
// if full time employee
if code == 1 then
gross_pay =
hours*30;
// if male
employee
if gender == "M"
then
totalFullMen = totalFullMen + 1;
deduction = 0.15*gross_pay + 200;
else
deduction = 0.10*gross_pay + 100;
totalPayWomen = totalPayWomen +
(0.10*gross_pay); //calculate paye by women
end if;
else // part time employee
gross_pay =
hours*20;
// if male
employee
if gender == "M"
then
deduction = 0.10*gross_pay ;
else
deduction = 0.05*gross_pay ;
totalPayWomen = totalPayWomen +
(0.05*gross_pay); //calculate paye by women
end if;
// calculate net
pay
net_pay = gross_pay -
deduction;
total = total +
net_pay; //calculate total amount paid to all
employees
print(name,hours,gender,gross_pay,deduction,net_pay);
input emp_num;
end while;
print("The total number of men who work full time :
",totalFullMen);
print("The total PAYE paid by women :
",totalPayWomen);
print("The total amount paid out by the company to all
its employees : ",total);
End
Write the pseudocode for the following: A company needs to print pay-slips for its employees. Each record contains the following: a. number, b. name, c. hours, d. gender, and e. code. Each employee’s...
Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...
Refer to Table 1. Write the Excel formula for each cell marked with “?” in columns B, C and D such that formula could be copied and pasted into columns D, E, F and G using Microsoft Excel without further editing. There is no need to explicitly write the Excel formula for cells marked with “Copy & paste”. Label each formula clearly with cell reference position. In 2020, BS Bank employs 800 employees in its call centres in the United States...