Knowee
Questions
Features
Study Tools

What would be the displayed as the increased monthly salary in the following pseudocode if the user enters the department as “A” and the annual salary as 20000? if anSalary is numberic then     monSalary = anSalary / 12if deptCode = “A” then     monSalary = monSalary + monSalary * 0.072else     if deptCode = “B” then         monSalary = monSalary + monSalary * 0.068     else         monSalary = monSalary + monSalary * 0.063     endifendifdisplay “The increased monthly salary is R”, monSalaryelse     display “The annual salary must be numeric.”endifa.The increased monthly salary is R1786.67b.The annual salary must be numeric.c.The increased monthly salary is R2144.00d.The increased monthly salary is R21440.00

Question

What would be the displayed as the increased monthly salary in the following pseudocode if the user enters the department as “A” and the annual salary as 20000? if anSalary is numberic then     monSalary = anSalary / 12if deptCode = “A” then     monSalary = monSalary + monSalary * 0.072else     if deptCode = “B” then         monSalary = monSalary + monSalary * 0.068     else         monSalary = monSalary + monSalary * 0.063     endifendifdisplay “The increased monthly salary is R”, monSalaryelse     display “The annual salary must be numeric.”endifa.The increased monthly salary is R1786.67b.The annual salary must be numeric.c.The increased monthly salary is R2144.00d.The increased monthly salary is R21440.00

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

  1. The user enters the department as “A” and the annual salary as 20000.

  2. Check if anSalary is numeric:

    • anSalary is 20000, which is numeric, so proceed to the next step.
  3. Calculate the monthly salary:

    • monSalary = anSalary / 12
    • monSalary = 20000 / 12
    • monSalary = 1666.67
  4. Check the department code:

    • deptCode = “A”
  5. Since deptCode is “A”, apply the increase:

    • monSalary = monSalary + monSalary * 0.072
    • monSalary = 1666.67 + 1666.67 * 0.072
    • monSalary = 1666.67 + 120.00
    • monSalary = 1786.67
  6. Display the result:

    • “The increased monthly salary is R”, monSalary
    • “The increased monthly salary is R1786.67”

Therefore, the correct answer is: a. The increased monthly salary is R1786.67

This problem has been solved

Similar Questions

Problem statementSend feedbackSuppose you have a list of employees in a company, and each employee is represented as an object with the following properties:"id" - a unique identifier for the employee"name" - the employee's name"department" - the department the employee works in"salary" - the employee's current salaryObjectives:You want to make a modification to the list of employees to reflect a recent company-wide salary increase. You have been provided with the following information:Salaries for employees in the "sales" department should be increased by 10%.Salaries for employees in the "engineering" department should be increased by 15%.Salaries for employees in all other departments should be increased by 5%.You need to write a function "increaseSalaries" that takes an array of employee objects and returns a new array of employee objects where each employee's salary has been updated based on their department. The original array of employees should be left unchanged.

Problem StatementShyam works at a company where his gross salary is calculated based on his basic salary along with other allowances. The company provides him with a Dearness Allowance (DA) of 10% and a Travel Allowance (TA) of 12%. Given Shayam's basic salary, write a program to calculate his gross salary. Note: This question was asked in Wipro coding test.Input format :The input consists of an integer N, representing Shyam's basic salary.Output format :The output prints "Gross Salary = " followed by an integer representing Shyam's gross salary.Refer to the sample output for formatting specifications.Code constraints :1000 ≤ N ≤ 50000Sample test cases :Input 1 :1280Output 1 :Gross Salary = 1561Input 2 :35750Output 2 :Gross Salary = 43615Input 3 :50000Output 3 :Gross Salary = 61000Note :The program will be evaluated only after the “Submit Code” is clicked.Extra spaces and new line characters in the program output will result in the failure of the test case.

An employee starts a job at $1600 per month on January 1, 2015. At the end of three months their salary is increased 5 percent. At the end of the sixth month, they received another 5 percent increase. What is their total salary for the year?

Which of the below queries displays employees' name and new salary after the increment of 1000

Salaries ___ since she became the CEO of our company.a) had increasedb) increasedc) have increasedd) are increasing

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.