Most voted "pseudocode" questions
Pseudocode is a generic way of writing an algorithm, using a simple language with no need to know the syntax of any programming language.
Learn more…25 questions
Sort by count of
-
10
votes3
answers4035
viewsLike writing a pseudocode?
I was reading about algorithms, but all the algorithms that I read, they were written in some unknown language or not invented, but somehow I could understand what was written there. I read about…
pseudocodeasked 7 years, 4 months ago CypherPotato 9,292 -
6
votes3
answers156
viewsWhat name is given to code modeling/notation?
I know the question got a little weird, but here’s the thing: It has a type of notation that is no language, but it serves as a basis to implement in some language. for example the algorithm of…
pseudocodeasked 10 years, 7 months ago anisanwesley 2,280 -
4
votes2
answers4751
viewsHow to do Table Test for a particular algorithm?
I have this algorithm, in a pseudocode: Knowing that n1 receives the value 20. inicio inteiro: n1,n2,n3; leia (n1); n2<-n1*3; n3<-n1-1+n2; imprima("O resultado final será n3=",n3); fim.…
-
4
votes2
answers330
viewsHow is the find function implemented?
Unlike match() looking for an occurrence of a language y in the beginning of the string, the find() makes a quest for y inside that string. I could use the algorithm of Knuth-Morris-Pratt to search…
-
3
votes1
answer270
viewsWhat’s wrong with this pseudo-code?
Who is following the Sof-br saw that I asked something about pseudo-code a few hours ago (here if you want to follow the context) Well, I need to make a pseudo-code in English that serves as a basis…
pseudocodeasked 10 years, 7 months ago anisanwesley 2,280 -
3
votes1
answer586
viewsInterpretation of an algorithm
I have to solve a problem with the following statement: The houses on that street Context A computer programmer lives on a street with houses only on one side. The houses on this street are numbered…
-
3
votes3
answers13025
viewsSum of whole numbers from 1 to 100
I am trying to create an algorithm that adds the numbers of the interval 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...…
-
3
votes1
answer485
viewsExercise Algorithm Given the values of x real and n natural positive, calculate
Given the values of x real and n natural positive, calculate: S = (x+1)/1! + (x+2)/2! + (x+3)/3! + ... + (x+n)/n! So far what I’ve done is this: leia x leia n nFatorial = 1 contadorFatorial = 0…
-
2
votes1
answer2216
viewsPython function "repeat ... to <cond. >"
I wanted to know if there is the following function, written in pseudocode, in the Python language: repeat (commands) until (condition); Thank you.…
-
2
votes1
answer1614
viewsHow to represent algorithm in C for Pseudocode?
I have the following code : setlocale(LC_ALL,"portuguese"); int numeros[5]; int media; for(int i = 0; i < 5; i++) { printf("Digite um número : "); scanf("%d", &numeros[i]); } media =…
-
2
votes1
answer72
viewsDual recursion in a function, how does it work?
I understand what happens in recursion when there is only one recursive call, I understand well how to write an output condition for recursions. But I have difficulty understanding when there are…
-
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
answer243
viewsPseudo Code Chess
They put a challenge to me to solve through pseudocode: A chess board with only the King and Queen. What is the minimum and maximum number of moves to checkmate the King? Black King, White Queen I…
-
1
votes1
answer1285
viewsFlip a stack using an additional stack and some variables
I’m needing to reverse an A stack using another additional stack B and some variables in pseudo code. For the stack A to be reversed at the end of the algorithm. Someone can help?
-
1
votes2
answers204
viewsPseudocode of an ATM that emits the smallest number of ballots possible
Guys, I need to make a pseudocode that emits as few ballots as possible, for example: $377 3 banknotes of 100 1 note of 50 1 note of 20 1 note of 5 1 note of 2 please, anyone who can help, I’ll be…
pseudocodeasked 8 years, 6 months ago Igor Rezende 11 -
1
votes1
answer63
viewsCan I assign value within a parameter?
I have a work in pseudocode, where I needed to create a function to receive a user value and do the mod by 2, so I did so: Função Módulo (x,b=2: inteiro) : inteiro Var i:inteiro Inicio…
-
1
votes2
answers806
viewsMathematical logic betting on the lottery
I can’t think of the mathematical logic of the following issue: Three friends played the lottery. In case they win, the prize must be apportioned in proportion to the amount each gave for the…
-
0
votes0
answers92
viewsHow to return the same random number in different systems?
A pseudo-random number generator like the rand() of PHP and the new Random.Next() of . NET will return different values same using the same seed and even full range, and this is not the right way…
-
0
votes1
answer81
viewsHow to build the below algorithm in pseudocode?
Construct an algorithm that can read two vectors of 3 character type elements and ask the user which candidate he wants to vote for and that the result of the operation is stored on other vectors.…
-
0
votes0
answers61
viewsUri 1160, beginner using visualg, repeat
The problem is in https://www.urionlinejudge.com.br/judge/pt/problems/view/1160: Mariazinha wants to solve an interesting problem. Given the population information and the growth rate of any two…
-
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
votes0
answers74
viewsI don’t know if my pseudo code is right
Make a pseudocode and flowchart that enters with 3 values and generates the 2 degree equation, check the possible roots. Delta= (b*b) -(4*a*c), check whether Delta is greater than 0, less than 0 or…
pseudocodeasked 4 years, 9 months ago Amanda Martini Aubim 11 -
-2
votes3
answers254
viewsLogic to compare four values and find the smallest
It is correct to compare 4 values in this way? Se (A < B && A < C && A < D){ Escreva A; }; Senao Se (B < A && B < C && B < D){ Escreva B; }; Senao…
-
-2
votes0
answers19
views"Expressions outside the program scope are not allowed" in pseudocode (portugol)
I am learning programming and started by logic with Portugol Studio. But I am having the following error: "Expressions outside the scope of the program are not allowed. To fix the problem, remove…
-
-2
votes0
answers12
viewsCryptography in C language
I need to make a pseudo-code to then pass in C-language from a Hill cipher encryption. The phrase to be encrypted will be inserted by the user and the key matrix as well. I cannot use character…