A software engineer writing the temperature-monitoring software shown in Figure 1 decided to refactor the code by implementing it as a subroutine called FindMax. Line 1 was removed, and the array temps was defined as a parameter of the subroutine, which now returns the value of max_temp.
Figure 1
1 temps ← [18.5, 19.2, 21.0, 17.8, 16.5, 20.1]
2 max_temp ← temps
3 i ← 1
4 WHILE i < 6
5 IF temps[i] > max_temp THEN
6 max_temp ← temps[i]
7 ENDIF
8 i ← i + 1
9 ENDWHILE
State two advantages of implementing this logic as a subroutine rather than keeping it as inline code.