A developer is writing a program to process a long list of employees and apply a cost-of-living increase of 3.2% to all employees making less than $15 per hour. Which of the following pseudocode snippets provides the best solution?
A.
If employeesalary is greater than $15 per hour employeesalary = employeesalary * 1.032
B.
For all employees in the list making less than $15 per hour employeesalary = employeesalary * 1.032
C.
If employeesalary is less than $15 per hour employeesalary = employeesalary * 3.2
D.
For all employees in the list making greater than $15 per hour employeesalary = employeesalary * 3.2
This pseudocode snippet correctly implements the requirement to apply a cost-of-living increase to employees making less than $15 per hour. By using a loop (For all employees in the list), it ensures that every employee meeting the condition (making less than $15 per hour) will have their salary adjusted by multiplying it by 1.032. This approach efficiently processes each relevant entry just once and applies the necessary increase accurately.
References: CompTIA IT Fundamentals documents typically cover basic programming concepts and logic, including how to use loops and conditions in pseudocode to manipulate data based on specific criteria.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit