1. Engineering
  2. Computer Science
  3. 231 in the pseudocode below we let err represent the...

Question: 231 in the pseudocode below we let err represent the...

Question details

2.31. In the pseudocode below, we let ERR represent the current value of the error, and MAX_ALLOWABLE be the maximum allowable absolute value of ERR. The initial value of ERR and MAX_ALLOWABLE are provided as input by the user. In each cycle of the loop, the current value of ERR is to be cut in half to get a new value of ERR, until either 50 cycles are completed, or the absolute value of the percent increase in the value of ERR relative to the preceding value of ERR is less than 0.0001%, whichever comes first. The final value of ERR is then printed. Complete the pseudocode.

INPUT ERR, MAX_ALLOWABLE

DOFOR J = 1 To 50

ENDDO

PRINT ERR

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution