I'm having trouble with the code to break the line.
I need to create a ladder that looks like this:
#
##
###
####
#####
If I put "#" ("#") it breaks the line, but the end result looks like this:
#
#
#
#
#
#
#
#
#
#...
I'm solving the following exercise:
Write an algorithm that calculates the mean of the numbers entered by the user, if they are even. Finish reading if user types zero (0)
However, when I type 0 to finish, it counts 0 as even number, a...
Let's suppose that the number is 12. How to show the numbers 1, 3, 6, 12 in front?
I put a note in front of the line of code that I'm talking about.
algoritmo "Nums primos"
var
N,C,TotNums : inteiro
inicio
C <- 1
TotNums <- 0...
I'm trying to create an algorithm that adds up the numbers in the range 1-100. In addition the program prints each element of the sum and at the end the result.
That is, 1 + 2 + 3 + 4 + 5 + 6 ...
Important: Using pseudo-language (portugol)...
When we use repita together with ate at the end of the block, should we also use fimrepita ? If not, when do we use this?
algoritmo "semnome"
var
t,n,i,m:inteiro
inicio
i<-0
repita
escreval ("entre com a n...
Good afternoon guys, all right?
I have an exercise here from the Faculty of Algorithms I, follow the statement below:
Write an algorithm that requests the age of several people (USE REPEAT). Enter the total number of people under 25 and...
I'm doing an exercise in visualg, in which the result can be both negative and positive, but I want the results only positive rather than negative. How to achieve this? What I have so far:
algoritmo "semnome"
// Função :
// Autor :
// Data : 0...
I am making an algorithm to show the highest grade and on this higher grade, show the name of the student who took the higher grade. At first everything seems ok, but it is not working. Where is the error?
algoritmo "melhor aluno"
var
Quantida...
I set the function below to check whether 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])) / (log(2)))...
I need to create an algorithm that returns different values each time I run, even though I get the same input values.
It aims to solve an issue where I need to analyze the generation of a certain living being who is more likely to have no chi...