Question
PROBLEMA
Sia data la seguente procedura:
procedure CALCOLO1;
variables A, M, I integer;
variables D string;
read D;
A = 0;
M = 0;
for I from 1 to len(D) step 1 do;
if D(L,I) == 'a'
then A = A + 1;
else if D(I,I) == 'm' then M = M + 1; endif;
endif;
endfor;
write A, M;
endprocedure;
Sapendo che il valore di input per la variabile D
è la stringa 'Nel mezzo del cammin di nostra vita'
calcolare i valori di output di A ed M e scriverli nella tabella sottostante.