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(" ",...
This exercise is faculty, I'm trying to do for VisualG but always from that "error syntax", which I did.
I tried others in other ways but found it easier to understand.
I do not want the answer, I want to find out where I'm going wrong...
Would you like to show Life: 0 in the VisuAlg console result?
I tried to put Ate (life = 0) but it gives infinite loop.
If someone can help me, I appreciate it.
The version of my VisuAlg is 2.0
algoritmo "RPG"
var
damage, life:...
I'm stuck on the conditional repetition part. What should I get in the code?
Algoritmo "Classes"
Tipo
Classes = registro
arq_Hp,arq_S1,arq_S2,arq_U : real
ana_Hp,ana_S1,ana_S2,ana_U: real
fimregistro //final
var
Skill: car...
Read a floating-point value with two decimal places. This value represents a monetary value. Next, calculate the fewest possible banknotes and coins in which the value can be decomposed. The grades considered are 100, 50, 20, 10, 5, 2. The possi...
algoritmo "semnome"
// Função :
// Autor :
// Data : 06/02/2018
// Seção de Declarações
var
veto1 : vetor[0..9] de inteiro
veto2 : vetor[0..9] de inteiro
j,i : inteiro
inicio
para i de 0 ate 9 faca
leia(veto1[i])
fimpara
para i de 0 ate 9 faca...
Is it possible to create an algorithm in visualg that reads a letter and transforms it by another letter or by a number that was already stored in the algorithm?
As simple encryption?
The logic would be:
A = B
B = C
C = D
If typed A, it...
algoritmo "Calculadora"
Var
num1, num2, r: real
operacao: caractere
inicio
EscrevaL("Digite: ")
leia(num1, operacao, num2)
caso operacao "+"
r <- num1 + num2
caso operacao "-"
r <- num1 - num2
caso operacao "*"
r <- num1 * num2
ca...