Most voted "portugol" questions
It is a fully Portuguese programming language that resembles a pseudo-code, but has a well-defined structured syntax.
Learn more…104 questions
Sort by count of
-
24
votes5
answers8920
viewsWhat is the difference between Visualg and Portugol?
I see here a great rummage in the tags visualg and portugol. By the tag wiki, it seems that Visualg would be the interpreter and Portugol would be the language itself. Visualg is regarded as a…
-
14
votes3
answers1609
viewsWhat is the function of the vector (array)?
I’m studying algorithms with Portugol and I’m having difficulty understanding the function of the vector in the code. I already know how to use this structure.
-
7
votes2
answers586
views -
7
votes1
answer182
viewsHow to improve this algorithm?
The goal of my algorithm is to make the user train division: he will have to hit 10 times in a row the quotient whole (that is, without decimal places) and the rest of the division. I made this…
-
6
votes2
answers40159
viewsHow to break the line at the Visualg prompt?
My way out: Name: So-and-so: so many years How to break the line on prompt of the Visualg? To look like this: Name: So-and-so Age: So Many Years…
-
6
votes5
answers17941
viewsHow to use the loop for(for) in Portugol?
I am learning algorithm, but I was in doubt about the use of Loop para (for). I know it’s a silly question, but unfortunately I have little internet access. I have the book but the doubt is this!…
-
6
votes3
answers4588
viewsAlgorithm with structure PARA and SE
An algorithm that reads the name and sex of fifty-six people and states her name and whether she is male or female. In the end report the total of men and women. I need the show to run on Visualg. I…
-
6
votes2
answers1673
viewsError in program in Visualg
I’m having problems with this program, because when I put it to work and type a value greater than 18, a message appears saying that is missing a FIMSE and that there is a FIMENQUANTO without a…
-
4
votes1
answer169
viewsNumberlist with Visualg
Problem with this algorithm in visualg The code is making infinite loop "Numberlist" // Função : // Autor : // Data : 09/02/2016 // Seção de Declarações var a1,b1,c1:inteiro inicio // Seção de…
-
4
votes2
answers708
viewsHow do I use nested repetitions to make this example?
* ** *** **** ***** ****** ******* ******** ********* ********** How do I do this with nested repetitions using the for Javascript, or in Visualg? to give you an idea of what the code would be like…
-
4
votes2
answers5747
viewsDisplay whether a person is of legal age or not
Can anyone help me with an exercise in visualg? is the following: the exercise asks so: Write a program that reads a person’s age. At the end, show whether that person is of legal age or not.…
-
3
votes2
answers1046
viewsFinding numbers in sequence that multiplied is a result
I helped my cousin solve a math exercise today. The exercise called for two numbers in sequence that when multiplied the result is 16512 (128 * 129). I would like to know a code that would solve…
-
3
votes2
answers3663
viewsHow to put different texts for "yes" and "no" in Visualg?
I started recently with programming, and I’m making an algorithm that guesses the user’s age, and I’m using Visualg to practice programming logic. How to put commands sim or não in the Visualg, and…
-
3
votes4
answers604
viewsReturn only positive results
I’m doing an exercise in visualg, in which the result can be both negative and positive, only I want the results only positive and not negative. How do I get it? What I have so far: algoritmo…
-
3
votes2
answers13835
viewsAlgorithm to calculate the sum of the numbers typed in portugol
I’m using Portugol Studio to study algorithms in Portuguese. And I’m having a hard time with a question that the teacher passed. the question is as follows: Develop an algorithm that requires the…
-
3
votes3
answers2734
viewsHow to use the REPEAT command in this algorithm?
I have the following question but could not understand how to do using the command REPITA: Write an algorithm that asks for the age of several people (USE REPEAT). Please report the total number of…
portugolasked 7 years, 6 months ago Vitor Cardoso 105 -
3
votes2
answers194
viewsCondition to continue loop while invalid value
I wanted to know about this code: Algoritmo "Brincadeira2Ou1 " Var A, C, P: inteiro Inicio A <- 0 C <- 0 P <- 0 escreval ("(=====================2===OU===1=====================)") escreval…
-
3
votes1
answer66
viewsVisualg G Algorithm
Ask for a person’s name and sex. Present at the end how many people are male and how many are female. The program terminates when user type ORDER in person name. Can someone help me? Every time I…
-
2
votes1
answer2887
viewsHow to make an algorithm to turn capital letters into lowercase letters?
I need an algorithm that accepts a string or literal expression in uppercase or lowercase. Example: leia(nome) Independent of entry: So-and-so, so-and-so or SO The output of the code escreva(nome)…
-
2
votes1
answer6018
viewsWhat are the differences between the repeating structures while, repeat and for?
Friends, I am learning programming logic and this doubt came when I should use these commands and their differences.
-
2
votes1
answer290
viewsDifficulty with loop (repetition) in portugol
I’ve got this exercise to do: Make a program that asks the user the amount of power plants energy in a region, after reading this amount of plants, the program requests for each plant what type of…
-
2
votes1
answer485
viewsVector issue portugol
Two questions about vectors and matrices. 1_Dado any vector with 100 integers, make a module that tells if there is or not repeated numbers on this vector. Algorithm "Repetition in the vector" Var…
portugolasked 8 years, 8 months ago Mathias Souza 31 -
2
votes1
answer1062
viewsvisualg ladder break line
I’m having trouble with the code to break the line. I need to create a ladder that looks like below: # ## ### #### ##### If I write ("#") it breaks the line, but the end result is like this: # # # #…
-
2
votes1
answer238
viewsWhat happens to variable i in this algorithm? Sequence inversion algorithm
Good evening. I started to study data structure in support of the book Data Structure and Algorithms 2nd ed (SZWARCFITER/MARKENZON). The first algorithm of the book deals with reversing the elements…
-
2
votes1
answer1158
viewsUsing LOG in VISUALG Functions
When using visualG LOG there is a problem, I need to divide a value typed by the user, by log 2 in base 10. Only he doesn’t make it he’s wrong. funcao menu_8():inteiro var logaritmo :real inicio…
-
2
votes3
answers178
viewsProgram in C : A certain doubt
The program I made compiles, but what is requested does not appear on the screen. That’s the thing about: Construct an algorithm in PORTUGOL, which receives three values, A, B and C, and store them…
-
2
votes1
answer4995
views -
2
votes1
answer1731
viewsSearch repeated numbers in list with Visualg
Write a program that receives 100 numbers typed by the user. At the end the program displays how many numbers are reported equal to the last number typed. As far as I can go: algoritmo "semnome" //…
-
2
votes2
answers11063
viewsHow to use % in Portugol
I have the following question: Write an algorithm that calculates a worker’s salary. The user will be asked for the value of the hour worked, number of hours and the % INSS discount. At the end,…
-
2
votes1
answer4196
viewsHow to save data in. txt file in Visualg?
People need to do a registration system in Portugol for a college job. However, I want the data to be saved for a possible query. There is the possibility to save data in a file . txt in Visualg? (I…
-
2
votes1
answer6506
viewsHow to put string and variables together in Portugol?
Hello, I am learning English for academic purposes and I am having problems in a code I am doing. But when I run it, it rotates until it’s time to average. Then he says he hasn’t found the student…
-
2
votes1
answer4559
viewsDivisible - Portugol (VISUALG)
I have the following question and below what I have tried but it is not just showing the divisible numbers that is my intention. I’m doing the test by typing the number 8, the correct one was for…
-
2
votes1
answer557
viewsVisual G : What does the character ' mean and how does it influence the results?
I’m learning to use the visual g through this stuff here: http://eletrica.ufpr.br/~Rogerio/visualg/Help/linguagem2.htm In this particular code I have a very small question, which contains no answers…
-
2
votes1
answer921
viewsRead two numbers in a single line in Portugol Studio
I will participate in a competition in a few days, and for data entry it is necessary to make a input of more than one value on the same line. For example: Instead of the user entering the first…
-
2
votes2
answers1896
viewsVisualg - Assign two variables on the same line
I would like to know how to put 1 variable next to each other in the visualg? Exemplo: 1.0 7.0 5.0 9.0 Since the 4 numbers are REAL variables, to simplify I want to write 1.0 below 5.0 ai the cursor…
-
2
votes2
answers1991
viewsHow do I determine the number that appears most often and the position it is in?
It was performed the reading of a vector of n positions, as I do to determine the number that appears more and the position where it is? programa { funcao inicio(){ inteiro vetor[] inteiro numero,…
-
2
votes0
answers165
viewsHelp with programming in Portugal
I’m a beginner and I need to solve a problem involving controlled repeating structures. The problem is this: A Mega Sena player wants to know all the possible combinations the game allows and the…
-
1
votes3
answers3755
views"Program scope not closed properly." in pseudocode
I wrote the following pseudocode only that I am receiving the following error: The program scope has not been closed properly. enter the character '}' to fix the problem. I have tried to close with…
-
1
votes1
answer2722
viewsScroll through a matrix and validate repeated numbers
I am doing a final work in the first semester of the BCC course and I need to do a Mega Sena algorithm with the following features: Maximum of 10 players Each player must bet a minimum of 6 numbers…
-
1
votes1
answer183
viewsArray to solve hidden sentence puzzle
" You have two arrays letras = ["m", "D", " ", "e", " ", "G", "v", "e", "i", "e", " ", "r", "S", "G", "D", "u"]; caminho = [ 12, 7, 11, 9, 8, 4, 15, 0, 2, 13, 14, 5, 10, 1, 3, 6]; There’s a hidden…
-
1
votes1
answer693
viewsHow to create an undetermined algorithm using visualg?
I need to create an algorithm that returns me different values each time it is executed, even receiving the same input values. It aims to solve a question where I need to analyze the generation of a…
-
1
votes1
answer128
viewsPortugol doubts about assigning values to characters
I would like to know how to assign to characters values already typed by the user in the loop. Code: nu,cont,contp :inteiro pot :inteiro tipo :caractere inicio cont <- 1 escreval("digite a qtd de…
-
1
votes1
answer1032
viewsTest output value to check if it is INTEGER
I set the function below to check if the output value is integer or real. funcao menu_8():inteiro var logaritmo :real inicio para contador de 0 ate 12 faca logaritmo <- ((log(i[contador])) /…
-
1
votes2
answers760
viewsHow to solve this "Error in syntax"
I have the following question and cannot think of a solution: Make an algorithm that reads the duration of an event in seconds and shows it expressed in hours, minutes and seconds. My code:…
portugolasked 8 years, 4 months ago thismarcoantonio 98 -
1
votes1
answer29
viewsHow to make a component with variables of different types?
algoritmo "Analisador Numérico Procedimento" // Função : Analisar Números com procedimentos LOL // Autor : Rodrigo Matos Aguiar // Data : 17/10/2016 // Seção de Declarações var Cont, NA, S, ND5, NN,…
-
1
votes1
answer150
views -
1
votes1
answer134
viewsWhy is this kind of comparison/choice wrong?
escreval("Digite o consumo") leia(consumo) escolha consumo caso <= 100 escreval("Parabéns, voce e economico") caso >=101 e <200 escreval("Cuidado com o consumo") caso >200…
-
1
votes0
answers1067
viewsexercise in visualg algorithm
The cost to the consumer of a new car is the sum of the factory cost with the percentage of the distributor and the taxes, both applied to the factory cost. It is known that the percentages are the…
-
1
votes1
answer912
viewsReturn to menu
I’m doing a college paper and I’m having a hard time putting my ideas into practice. The job consists of a "manager for car rental". My code so far is like this: Algoritmo "semnome" Var Cliente,…
portugolasked 7 years, 2 months ago Cassiano Thurow 11 -
1
votes1
answer941
viewsVisualg - Prog for limits
I am doing the program of the following exercise: Create an algorithm that reads the lower and upper bounds of a range and print all odd numbers in the open range and its sum (USE THE FOR). Suppose…