Questions tagged as 'portugol'

1
answer

Loop loop in programming logic algorithm

I am in doubt on this issue: Write an algorithm that requests the age of several people (USE REPEAT). Enter the total number of people under 25 and the total number of people over 50. The program ends when age is negative (Not to be counted)....
asked by 13.04.2018 / 20:11
1
answer

VisualG - Exercise with procedure

Good afternoon guys, all right? I have an Algorithm I exercise, and I'm stuck in a doubt. The question: - Write a procedure that receives an integer and prints it in the extended form. For example, for 1 the desired output is "One." The...
asked by 11.05.2018 / 17:50
2
answers

Factorial Algorithm in Portuguese Studio

I have this algorithm: programa { inteiro numero, fatorial, resultado=1 funcao inicio() { escreva ("Insira um número a ser fatorado: ") leia (numero) para (fatorial = 1; fatorial <= numero; fatorial++...
asked by 11.04.2017 / 23:00
1
answer

Error: Duplicate name for procedure or function

I'm training the use of procedures in VisualG and wanted to know why the code below presents the error:    "Duplicate name for procedure or function: 'SEX'". Remember, the main goal is not to optimize the code, but to know the reason for...
asked by 20.10.2016 / 05:39
1
answer

Invert the size of the letters box - VISUALG

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(" ",...
asked by 08.06.2016 / 01:48
1
answer

Scope of variables

   Why do we have 2 variables with the same name in the program in question?    What value does the program print?    What should we do to get the value 15 printed?    Thinking about variable scope, how do we classify the variable in row 4?...
asked by 30.05.2018 / 01:43
0
answers

Game of shifts in Visualg

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...
asked by 24.05.2018 / 16:44
1
answer

how do I identify the quantity that was repeated and the names repeated?

Make an algorithm in portugol that reads the name of up to 100 people and enter the number of names equal to "jose da silva" and the number of names equal to "ana maria". The algorithm should not accept empty names. algoritmo semNome; // Sínte...
asked by 25.03.2018 / 20:37
1
answer

How to eliminate repeated numbers from a visual vector?

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...
asked by 08.02.2018 / 19:53
1
answer

How to declare the final result as variable in a repeat structure in Visualg?

I'm using Visualg as a start to get an idea of programming logic. It turns out that I have created an algorithm with the repita structure along with the se structure that counts the number that the user has chosen up to where he wa...
asked by 17.11.2016 / 15:44