Respuesta :
Algorithms are simply used as prototypes or guide of an actual program
Trace the algorithm
The complete question is added as an attachment
The variables in the algorithm are
Variables I and A
Where A represents the initial amount invested, I represents the number of years
So, the trace of the algorithm is:
- Initialize A to 0
- Iterate with I from 0 to 3
- Add 200 to A
- Multiply A by 1.08
- Print A after the iterations
How the algorithm can be amended
From the question, the amendment of the algorithm is to print the investment after each year.
To do this, we simply include the print statement inside the loop statement
So, we have:
A = 0
FOR I = 0 TO 3
A = A + 200
A = 1.08 * A
PRINT A
NEXT I
Modify the algorithm
The modified algorithm is as follows:
A = 0
INPUT P
INPUT N
FOR I = 0 TO N
A = A + P
A = 1.08 * A
NEXT I
PRINT A
Read more about algorithms at:
https://brainly.com/question/22984934
#SPJ1
