Questions tagged as 'visualg'

4
answers

How to determine if a number is a power of 2?

I need to develop an algorithm in VisuAlg where I enter a number and it tells me whether it is a power of 2 or not. What strategies can I use?     
asked by 01.06.2016 / 02:51
1
answer

How to improve this algorithm?

The purpose of my algorithm is to make the user train division: he will have to hit the integer quotient (ie no decimal places) and the rest of the division 10 times in a row. I made this algorithm especially for my niece, so she passed the ch...
asked by 21.10.2016 / 23:37
2
answers

Portugol have ternary operator?

Does Portugol have any ternary operators? Example how it works in various languages: algumaVar = 10 > 0 ? 8 : 4 Just out of curiosity, it would be interesting if it had.     
asked by 16.02.2017 / 20:20
2
answers

Error in the program in VisualG

I'm having problems with this program, because when I put it to work and I type a value greater than 18, a message appears saying that it is missing a FIMSE and that there is a FIMENQUANTO without a corresponding ENQUANTO . t...
asked by 21.10.2017 / 00:08
2
answers

How to break the line at the VisuAlg prompt?

My output:    Name: So-and-so: so many years How to break the line at prompt of VisuAlg? To look like this:    Name: So-and-so       Age: So Many Years     
asked by 16.10.2014 / 14:29
3
answers

Algorithm with structure PARA and SE

An algorithm that reads the name and gender of fifty-six people and gives the name and whether it is a man or a woman. In the end, report the total number of men and women. I need the program to run in VisualG. I made this code but it is not...
asked by 30.09.2015 / 01:47
2
answers

Show if the person is of legal age or not

Can anyone help me with an exercise in visualg? is as follows: Exercise calls like this:    Write a program that reads a person's age. At the end, display whether or not that person is of age.       Console       What is your age: 17.     ...
asked by 21.07.2017 / 14:14
1
answer

Numberlist with VisuAlg

Problem with this algorithm in visualg The code is looping infinite "Numberlist" // Função : // Autor : // Data : 09/02/2016 // Seção de Declarações var a1,b1,c1:inteiro inicio // Seção de Comandos para a1 de 0 ate 9 faca...
asked by 10.02.2016 / 03:06
1
answer

How to tell if a number is integer

I need to develop an algorithm where it divides a number by 2 until it reaches the rest of the division, and I need to know if the rest of this division is an integer, what method can I apply to develop this problem? where: funcao menu_8():i...
asked by 01.06.2016 / 20:17
2
answers

What is the difference between the 2 parameter passes? [duplicate]

There is a parameter passing by value and by reference. I wanted examples to better understand the difference.     
asked by 04.01.2017 / 19:07