In your code, you have two se
and only fimse
. The fimse
was missing for the first se
. Your code should look like this:
algoritmo "semnome"
var
n,i,ma,me:inteiro
inicio
i<-0
me<-0
ma<-0
enquanto (i<21) faca
Escreval ("insira um numero inteiro:")
leia (n)
se n<0 entao
me<- me+1
senao
se n>0 entao
ma<-ma+1
fimse
fimse
i<-i+1
fimenquanto
escreval ("a quantidade de numeros maiores inseridos foi:",ma)
escreval ("e a quantidade de numeros menores inseridos foi:",me)
fimalgoritmo
The reason for the error message referring to fimenquanto
is that there was a se
block open, so it would be expected to be fimse
. However, the compiler encountered a fimenquanto
, which was not what he expected.