algoritmo "numeros_perfeitos"
var
c, n:inteiro
nv, np, npv:real
inicio
para n <- 1 ate 100 faca
para c <- 1 ate n faca
se n % c = 0 entao
nv <- n / c
se nv < n entao
np <- nv + np
fimse...
I have the following question and below what I have tried but it is not showing only the divisible numbers that is my intention.
I'm doing the test by typing the number 8, the correct program was to say " 8 is divisible by 8 and by 2 "
Wri...
I'm having difficulty with the following question:
Create an M matrix [21,10]. Read 10 names (maximum 20 characters) and store in the first row of the array. After reading, decompose the names letter by letter and store them in the other l...
I recently started programming, and I'm doing an algorithm that guesses the user's age, and I'm using Visualg to practice programming logic.
How to put sim or não commands in Visualg, and if the person chooses sim , enter...
Staff need to make a registration system in Portugol for a college job. However, I want the data to be saved for a possible query.
Is it possible to save data in a .txt file in VisualG?
(I searched for the "file" command but I did not unde...
Write a program that receives 100 numbers entered by the user. At the end the program displays how many numbers you enter are the same as the last number entered.
As far as I can go:
algoritmo "semnome"
// Função :
// Autor :
// Data :...
I would like to always display Vida: 0 in the last block, even if the value is negative, without doing this "Gambiarra" that I made just below.
Is there a function that rounds vidaInimigo , without having to create an additional...
When using LOG in visualG a problem is occurring, I need to split a value entered by the user, by log 2 in base 10. But he does not do this error.
funcao menu_8():inteiro
var
logaritmo :real
inicio
para contador de 0 ate 12 faca
logaritm...
I'm learning to use visual g for this material here: link
In this particular code I have a very small question, which contains no answers in either material or google.
algoritmo "exemplo"
var x: real
y: inteiro
a: caractere
l: logico
inic...