portugol

Program error in VisualG

I'm having problems with this program, because when I put to work and type a value greater than 18, a message appears saying ... ficação: adulto") senao escreval ("Sua idade corresponde a classificação: idoso") fimse fimenquanto fimalgoritmo

How to create an indeterminate algorithm using visualg?

I need to create an algorithm that returns me different values each time it runs, even getting the same input values. Aims t ... hat calculates its generations as long as it has children, and says that it has gone extinct when there are no more children.

Factorial algorithm in Portugol Studio

I have this algorithm: programa { inteiro numero, fatorial, resultado=1 funcao inicio() { escreva (" ... } Which correctly returns the factorial to me. But how do I get him to return all the math? EX.: 5! = 5x4x3x2x1=120

What is the difference between VisuAlg and Portugol?

I'm seeing here a big rummage in the tags visualg and portugol. From the tag wiki, it seems that VisuAlg would be the inte ... e in Wikipedia about Portugol Notes I am using a softer definition of programming language that includes pseudocodes

Divisible-portugol (VISUALG)

I have the following question and below what I have tried but it is not showing only divisible numbers which is my intention. ... - divisível + 1 fimse contador <- contador + 1 ate (contador > numero) escreva("Número: ",divisível) fimalgoritimo

What are the differences between repeat structures while, repeat and for?

Friends, I'm learning programming logic and came this doubt when I should use these commands and their differences.

How to put different texts for " Yes " and " no " in Visualg?

I recently started with programming, and I'm making an algorithm that guesses the age of the user, and I'm using Visualg to p ... 50 Escreval ("A multiplicação de ",S2, " e 50 é ",S3,".") Esreval ("Você ja fez aniversario esse ano?") fimalgoritmo

How to save data to file.txt not VisualG?

Personnel need to make a registration system in Portugol for a college job. However, I want the data to be saved for a possib ... aving data to a file .txt not VisualG? (i searched found the command "file" but did not understand how to use) Thank you!

What is the difference of the structure "while" and repeat in VisualG?

What is the difference of the structure "while" and repeat in VisualG? Do you have an example?

Visual G: what does the ': 'character mean and how does it influence the results or not?

I'm learning to use the G visual by this stuff here: http://eletrica.ufpr.br / ~rogerio/visualg/Help/linguagem2.htm In th ... and why the numbers 4 and 1? Did not understand what this character':' means and how it influences or not on the results.

What is the function of the array?

I'm studying algorithms with Portugol and I'm having a hard time understanding the vector function in the code. I know how to use that structure.

Question vector portugol

Two questions about vectors and matrices. 1_give any vector with 100 integers, make a module that tells you whether or not th ... in the given order or in reverse order. Assume that obligatorily there is a row or column equal to the vector in the Matrix.

Scroll through an array and validate repeated numbers

I am doing a final work in the first semester in the BCC course and I need to make a Mega Sena algorithm with the following c ... et, but not I was able to find a functional method for this. Anyone who can help, feel free to use the C language itself.

How to eliminate repeated numbers from a visualg vector?

algoritmo "semnome" // Função : // Autor : // Data : 06/02/2018 // Seção de Declarações var veto1 : vetor[0..9] de inteiro ve ... t to take the values and put all in Vector 2 but excluding the repetition example 1.2.3.4.4.5.6.7.8.9 appears only 123456789

How to use the repeat command in this algorithm?

I'm with the following question but I couldn't figure out how to do it using the REPITA Command: Write an algorithm that ... imse se (idade>=maior) entao maior <- idade fimse fimpara idade_media <-idade_media/10 escreval

Display whether the person is of legal age or not

Can anyone help me with an exercise in visualg? it is as follows: the exercise asks like this: Write a program that read ... escreva ("Digite sua idade: ") leia (idade) escreva fimalgoritmo O code I made is the one above but it is giving error.

Finding numbers in sequence that multiplied is a result

Today I helped my cousin solve a math exercise. The exercise asked for two numbers in sequence that when multiplied the result is 16512 (128 * 129). I would like to know a code that solves this with any number.

How do I determine the number that appears the most times and the position it is in?

Was performed the reading of a vector of n positions, how do I determine the number that appears more and the position in whi ... } } } I can't determine which number repeats the most, what I've been able to determine is where there are repeats.

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

Make an algorithm in portugol that reads the name of up to 100 people and reports the amount of names equal to "jose da silva ... do=nome; fimSe se (comparaTexto(nome,nomeRepetido)==0)entao escreval("nome:",nome); fimSe fimPrincipal

How to solve this "syntax error" [closed]

closed. this question is out of scope and is not currently accepting answers. ... 0 sec<-(segundos%3600)%60 escreva(horas,":",minutos,":",segundos) fimalgoritmo I always get: error in syntax