n the following pseudocode, what percentage raise will an employee in Department 8 receive?

if department < 5 then
raise = SMALL_RAISE
else
if department < 14 then
raise = MEDIUM_RAISE
else
if department < 9 then
raise = BIG_RAISE
endif
endif
endif
MEDIUM_RAISE

Respuesta :

Answer:

"MEDIUM_RAISE" is the correct answer for the above question.

Explanation:

  • In the above pseudo-code, The first if statement will false because the question suggests that the department value is 8, which is greater than 5. But the first if statement states that the department value is less than 5.
  • Then the else-if statement gets checked which gives the true result. It is because the value of the department variable is 8, which is less than 14.
  • So the else-if statement block will be executed which assigns the MEDIUM_RAISE value to the raise.
  • Hence the answer is "MEDIUM_RAISE".

Pseudocodes are used as a prototype of an actual program.

An employee in Department 8 will receive a MEDIUM_RAISE percentage raise

From the pseudocode, we have the following highlights

If department is less than 5, then the raise is SMALL_RAISE

The above condition would not be executed for the employee because 8 is not less than 5

If otherwise the department is less than 9, then the raise is MEDIUM_RAISE

The above condition would be executed for the employee because 8 is less than 9

Hence, the employee will receive a MEDIUM_RAISE percentage raise

Read more about pseudocodes at:

https://brainly.com/question/24953880