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
-
1
votes0
answers97
viewsI have some problems in my code - Portugol
Anyway, I am creating a game in Portugol Studio (Show of Millions), is a game of questions and answers... However, my work has to have the way of 2 players (Multiplayer) And I have no idea how to…
-
1
votes1
answer374
viewsCompare values of a vector with a matrix
I am new here and beginner in programming, I would like your help, I need to make an algorithm that simulates the mega sena, I must present a matrix with bettors and dozens of bets, a vector with…
-
1
votes0
answers270
viewsCommand while in code in Visualg
Good evening guys. I have this code made and I need to do what the exercise is asking, but I don’t understand and I don’t know how to do it. The only hint I have is that you should use the command…
-
1
votes0
answers30
views -
0
votes2
answers464
viewsPortugol expecting a value of the "real" type
I have a problem in my pseudocode, when I run it informs that: the data entry of the program expected a value of the 'real' type, but no value was informed or the value is of another type; How to…
portugolasked 10 years, 7 months ago matheus ferreira 357 -
0
votes1
answer795
viewsReverse letter box size - VISUALG
I’m having a problem with programming visualG algorithms. need to invert an array with values assigned to it. // opcao 18 funcao menu_18():caractere var inicio escreval (" A ORDEM INVERSA É: ") para…
-
0
votes2
answers15349
viewsFactorial algorithm in Portugol 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;…
-
0
votes1
answer566
viewsError: Duplicate name for procedure or function
I am 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'". Remembering, the main objective is not to…
-
0
votes1
answer246
viewsHow 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. I happen to have created an algorithm with the structure repita along with the structure se which account of the number the user has…
-
0
votes2
answers1343
viewsHow 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 veto2 : vetor[0..9] de inteiro j,i : inteiro inicio para i de 0 ate 9 faca…
-
0
votes4
answers706
viewsHelp in portugol
Request the entry of a salary and the intended installment amount to be paid monthly. If the intended installment is greater than 20% of the salary, show "Loan cannot be granted". Otherwise show…
portugolasked 6 years, 7 months ago Gilson Andrade 3 -
0
votes1
answer117
viewsScope of variables
Why we have 2 variables with the same name in the program in question? What value the program prints? What should we do to get the 15 printed? Considering the scope of variables, how do we classify…
-
0
votes1
answer869
viewsLine Break At Visualg’s Run Prompt:
I’m building an algorithm to calculate an employee’s special credit benefit. As you can see, in the image, at the prompt of execution, the result of the execution of line 23 goes beyond the screen…
-
0
votes1
answer142
viewsCalculation of Sobra VISUALG
Good evening, Colleagues! I have this problem and I cannot find a solution even in the IDE documentation. I’d like to know which command to use to pick up the leftover division to use it in the…
-
0
votes1
answer126
viewsHow to display all primes of N starting at 1 from a given input?
This is the algorithm that I have been able to develop so far in portugol: programa { funcao inicio() { inteiro n1, soma ,div,div2 escreva("digite um numero") leia(n1) para(inteiro i=1 ;i < n1 ;…
portugolasked 5 years, 6 months ago Naruto senin 1 -
0
votes2
answers141
viewsHelp in Portugol (se e senao)
I want the user to type "0" to have the program closed at the same time,because 0 is an invalid number, but I can’t,: programa { funcao inicio() { inteiro base,altura,area escreva("\nDigite a…
portugolasked 5 years, 3 months ago Torricelli 21 -
0
votes1
answer207
viewsHow do I identify the amount that was repeated and the names repeated?
Make an algorithm in Portuguese 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…
-
0
votes1
answer531
viewsLoop repetition in programming logic algorithm
I have doubts about this: Write an algorithm that asks for the age of several people (USE REPEAT). Please report the total number of people under 25 and the total number of people over 50. The…
-
0
votes1
answer42
viewsProg in C stating if x is divisible
Good afternoon guys, all right? I’m continuing my C exercises, and I got stuck in one more. Here is the statement of the same: Write an algorithm that takes a keyboard number and tells you if it is…
portugolasked 6 years, 6 months ago tspereirarj 49 -
0
votes1
answer99
viewsWhat is the use of true or false?
I still don’t understand the right time to use them. I’m taking the course in EAD and don’t have much text or exercises about them.
-
0
votes0
answers375
viewserror (expected to find SO ) in visualg
algoritmo "qual e o maior valor [vetor]" var valores:vetor[1..4] de real cont:inteiro maior:real inicio cont<-1 maior<-0 enquanto cont<=4 faca escreva("Qual e o",cont,"º Valor: ")…
-
0
votes2
answers1132
viewsFunctions and procedures in Portugol
About functions and procedures, I have a big doubt in this matter. I know that a function will always return data and that procedure has no return, but every function has to fill in all parameters?…
-
0
votes1
answer836
viewsVisualg - Exercise with procedure
Good afternoon guys, all right? I have an exercise in Algorithms I, and I’m stuck in a doubt. The question: - Write a procedure that takes an integer number and prints it in the extended form. For…
-
0
votes0
answers11
viewsCreate a function in portugol studio that takes two integer numbers per parameter and returns the largest one between the two
program { larger integer function (integer x, integer y) { integer result = x/y se (x>y) retorne x senao retorne y } funcao numero ( inteiro x, inteiro y ) { inteiro resultado = x / y } funcao…
-
0
votes1
answer57
viewsSave ticket values by adding to existing amount
Create a flowchart that reads from the user the value of a ticket and at the end shows: the total of the ticket and how many tickets were sold. The flowchart should only stop when typing zero in the…
-
0
votes1
answer450
viewsVisualg syntax error (English)
When placing the code this way and entering this data "Faults = 0 Proofs = 5, 9, 7.2 Job = 10.5 Age = 15 Result = Failed", the same as the error when compiling, displays syntax error in "Result…
-
0
votes1
answer210
viewsUse of vectors and binary search in English
One of the most commonly used activities on the computer is to locate an object (number or string) in a data set. You should develop an algorithm that allows you to find a number in a vector of 100…
-
0
votes1
answer43
viewsreceive the quantity of a product and the value and ask if Qur type any more product if yes have to repeat the process and then show the total
but I need to add up the total of every time rodando programa { funcao inicio() { cadeia nome real val, total inteiro quant caracter opcao = 'f' enquanto(opcao !='n') { escreva("digite o nome do…
portugolasked 5 years, 7 months ago Naruto senin 1 -
0
votes1
answer120
viewsvector logic portugol
If anyone helps me I am grateful, I am stuck in carrying lower values than previous values Algoritmo "semnome" // Disciplina : [Linguagem e Lógica de Programação] // Professor : Antonio Carlos…
-
0
votes1
answer61
viewsAlgorithm that sorts decimal numbers
People who can help me I am extremely grateful, I’m trying to build an algorithm that orders 3 real numerical values in ascending order, but not how to deal with decimal numbers in the algorithm...…
-
0
votes1
answer886
viewsLogical expression for (While or If) Create repetition until the user gets the answer right
I am having problems in a question to define the result of a question in Visualg, so that if the user answers the wrong way the question will repeat until the user gets it right. The question is:…
-
0
votes1
answer643
viewsHow to "catch" system time in Portugol Studio
I know you need to import the Calendar library.But I don’t know how the current time function works.I’m trying to print on the screen to test this function. Go the following code programa{ inclua…
-
0
votes0
answers184
viewsPortugol error... I’m new, first time here
Says Guys, blx... I’m new at this, very new actually... anyway, I’m with a mistake in Portugol, and I really don’t understand what’s wrong, you’re asking to put '(' but it’s already there... I’m…
-
0
votes4
answers1171
viewsHelp in Portugol (se e senao encadeado)
It was proposed by the teacher to perform an activity, that from a day, month and year entered by the user, the algorithm should verify whether it is a valid date or not. Consider months with 30 and…
-
0
votes1
answer994
viewsHelp Portugol(ascending order)
The code below should sort the numbers typed in ascending order, but when typed 5,3 and 8 respectively, the program displays them out of order. program { funcao inicio() { //variaveis inteiro i real…
-
0
votes0
answers211
viewsAlgorithm in Portugol
I’m doing a college paper and the premise is: Develop an algorithm that: a) read 60 ages; b) group the ages into three vectors according to the age group below. Remembering that there are possible…
-
0
votes1
answer67
viewsPortugol - Function not executed if called from outside the program
Good evening, everyone. I’m new in programming and I’m doing the Guanabara courses. I got stuck in this exercise: var contador: inteiro resposta: vetor[1..5] de caractere aluno: vetor [1..3] de…
-
0
votes0
answers49
viewsAlgorithm of Portugol SE
I have a small question about portugol. The question asks these details: Above R $ 400,00 30% of the average balance R$ 400,00 (inclusive) up to R$ 300,00 25 % of the average balance R$ 300,00…
-
0
votes2
answers396
viewsHelp with logic - Portugol Studio
good morning! I’m trying to learn how to program, I started with logic + portugol. When trying to perform a condition exercise, the following error occurred in portugol studio: "There are code…
-
0
votes2
answers64
viewsHow to insert Rand into C?
In portugol: Algoritmo "semnome" // Linguagem e Lógica de Programação // Lu e Gustavo // Descrição : Aqui você descreve o que o programa faz! (função) // Autor(a) : Nome do(a) aluno(a) // Data atual…
-
0
votes1
answer86
viewsVisualg does not recognize Real type variable
I’m doing a program at a school where the program should ask how many students, right after offering a "registration" for each student stating their name and grade. In the case of this code, when…
-
0
votes1
answer37
viewsINCORRECT SYNTAX Visualg
I need to make a code to calculate the ideal weight of men and women, but the teacher said I need to do only using IF-SO, and leave the SENAO out, hence all made that I run this program the first…
-
0
votes0
answers22
viewsProcedure not being performed in Portugol Studio
I created a code to receive the: names, age, sex and salary of 10 people, a function to sort the vectors according to the highest salary, and another function to return the names of the 5 best paid…
-
0
votes1
answer43
viewsdraw a square with repeat loops in portugol
Hello! I am learning Portuguese for academic purposes and I have a little problem... I need to draw a square with asterisks but I am not able to draw the bottom and the right, it is coming out like…
-
0
votes1
answer39
viewsProgramming logic (Portugol) (Visualg). How can this variable (MA) show me the exact name of the student who got the highest grade?
The program is working perfectly. My doubt is only about this algorithm, I can not understand how this variable (MA) can show me the highest grade only with the attribution MA <- A. If someone…
-
-1
votes1
answer65
viewsProgram that makes the entire table between two numbers I type
ex 2 4 The program has to do two tabs of 3 and four in Portugol /*mostra toda a tabuada entre dois numeros digitados name will data 22/04/2019*/ programa { funcao inicio() { inteiro…
-
-1
votes1
answer1169
viewsHow to interrupt in Visualg?
Good evening, everyone. How do I interrupt a command in visualG? What has been requested: Write an algorithm that writes a sentence on the screen until the letter "F" is typed (without quotation…
-
-1
votes1
answer62
viewsError of expression "if"
My code is giving this error in the first expression se: "The expression was not started correctly. Enter the character '(' to fix the problem" real m1, m2, m3 escreva("\n Digite o peso da primeira…
-
-1
votes1
answer49
viewsProblem with Conditional Structure If and Otherwise
I would like to know why the program does not display the Student Performance : Escreva("Digite a primeira nota: ") Leia(nota1) Escreva("Digite a segunda nota: ") Leia(nota2) media <- (nota1 +…
-
-2
votes3
answers4592
viewsHow to do exponentiation using multiplication in Portugol as arithmetic operation?
I need to make a pseudocode that has numero1 and numero2 (have to be natural numbers less than 50), need to raise the numero1 at the numero2, just using the multiplication operation, and show the…