Tp=2; U=1;
W=,15,0,7,8,21 [12]
For t=1: length (W)
If s (t) + W & lt;=tp * u * R
If s + W (t) - u * R<=0
S=0;
The else s=s (t) + W - u * R;
End
Disp (s)
The else N=N + (s + W (t) - tp * u * R);
S=(tp - 1) * u * R;
End
End
N
CodePudding user response:
Directly on the code, the pseudo code see don't understandCodePudding user response: