Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a pseudocode using if instruction containing a compound condition that wi

ID: 3544918 • Letter: C

Question

Create a pseudocode using if instruction containing a compound condition that will satisfy the following: When employeeCode is equal to MGR and SALARY is                    greater than 100,000, display "This manager is eligible for a five percent bonus for the year." Otherwise, when employeeCode is equal to MGR and SALARY is                    greater than 250,000, display "This manager is eligible for a 10 percent bonus for the year." In all other cases, display "This person is not eligible for a                    bonus for the year."
                    Note: The above text is not in a pseudocode format. You need to use the IF ELSE ENDIF clause in a pseudocode format with appropriate relational and logical                    operators

PSEUDOCODE ONLY

Explanation / Answer

pseudocode



Start

IF employeeCode == MGR && SALARY > 100000 && SALARY < 250000

print "This manager is eligible for a five percent bonus for the year."

ELSE IF employeeCode == MGR && SALARY > 250000

print "This manager is eligible for a 10 percent bonus for the year."

ELSE

Print "This person is not eligible for a bonus for the year."

ENDIF


END













Explanation




Trick was the section when salary is > 250000

and salary is > 100000.

Here I have used two conditions for salary in first if statement just to check for the range when salary is > 100000 but lesser than 250000.

Second condition will check for salary greater than 250000

anything else is handled by ELSE block

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote