FC0-U61 · Question #814
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 snipp
The correct answer is B. For all employees in the list making less than $15 per hour employeesalary = employeesalary *. 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 h
Question
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?
Options
- AIf employeesalary is greater than $15 per hour employeesalary = employeesalary * 1.032
- BFor all employees in the list making less than $15 per hour employeesalary = employeesalary *
- CIf employeesalary is less than $15 per hour employeesalary = employeesalary * 3.2
- DFor all employees in the list making greater than $15 per hour employeesalary = employeesalary
How the community answered
(58 responses)- A3% (2)
- B81% (47)
- C12% (7)
- D3% (2)
Explanation
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.
Topics
Community Discussion
No community discussion yet for this question.