I don’t know much about Visualg, but let’s go with logic:
For you to read and store various values it is necessary that you have variables to dedicate memory space to this. Instead of creating multiple variables (name1,Nome2,name3) you can create a vector:
vet: nomes [1..10] de caractere //1..10 é o inicio e fim do seu vetor.
So just go adding names in this "list" of names through a PARA
and then give another repeat loop to traverse this array.
Algoritmo "semnome"
Var i,:inteiro
vet: nomes [1..2] de caractere //1..2 é o inicio e fim do seu vetor.
Inicio
para i de 1 ate 2 faca
escreval("Digite o nome: ")
leia(nomes[i])
fimpara
//Inicio de outro PARA para escrever os nomes.
para i de 1 ate 2 faca
escreval("Nome: ",nomes[i])
fimpara
As I said, my knowledge of visualg is not there those things but I believe it helps :D
is that msm worth :D
– Alefe Patrick