I'm having a problem, programming algorithms in visualG. I need to invert an array with values assigned to it.
// opcao 18
funcao menu_18():caractere
var
inicio
escreval (" A ORDEM INVERSA É: ")
para contador de 12 ate 0 faca
escreva(" ", c[contador])
fimpara
escreval(" ")
fimfuncao
where the counter values are from 0 to 12, with characters assigned to them, but I need to print the inverse of them.
example (" A B C ")
saída: (" C B A ")
What would be the best resolution for this problem?