-2
Good morning!
I’m a beginner in algorithm and I’m making an algorithm that receives from the user an array of 20 integer positions with values between 1 and 20, but there can be no repeated number and no less than 1 to more than 20. My question is how to make these conditions run.. who can help me thank you very much.below follows what I did
Algorithm "without name"
Var
valores: vetor[1..20] de inteiro
i,num: inteiro
Inicio
para i de 1 ate 20faca
escreva("informe um valor:")
leia(num)
valores[i] <- num
fimpara
escreval("================================== ")
para i de 1 ate 20 faca
escreva(" ")
escreva("o elementos do vetor são:",valores[i])
escreval(" ")
escreval(" ")
fimpara
Fimalgoritmo