Posts by tredeneo • 82 points
8 posts
-
0
votes1
answer68
viewsA: Pointers in Go
about string: go strings are imutaveis, that is taking specific methods for the string type it n can be modified, unless something is assigned to it altogether pointers: to avoid ambiguities the way…
-
0
votes1
answer68
viewsA: Error in a matrix character counter
n use VS(then n can reproduce exactly the error of this code), but by "read access violation" and seeing the code I deduce q is: 1 - matriz[3][3] and then in the code for (int i = 0; i < linhas;…
-
0
votes1
answer155
viewsA: Use of switch case to choose a function
this correct way of using the switch case, however I do not know if this program would work, because soma_A,soma_B, num1 and num2 are not being received from nenhnum place (if global variables work,…
-
-1
votes1
answer58
viewsA: Problem with Fibonacci Sequence Calculation
basically the problem is in the last execution of the for, as its pro condition is ending depends on a calculation and not only the increment of one by one, it may occur of the calculation to…
-
1
votes1
answer449
viewsA: Save data from one vector to another vector in C
an option is to create an array(in q each row will be a string) int j=0;//contador para as linhas char vetornovo[TAMANHO][100]; //tamanho seria quantas linhas vc acha q teria(o ideal seria fazer…
-
1
votes2
answers672
viewsA: Recursive function
the stopping condition for the Euclides algorithm (used to find mdc) is when it finds a remainder = 0 and when it occurs it returns the divisor that took this remainder to be 0 if(n == 0 ){ return…
-
1
votes4
answers428
viewsA: Receive various values and print only the 3 largest ones in c
first mistake: the reason you are always giving -1 is that Voce le option then stores in the variables and only after storing or not in them will be checked if it is -1 or n, then the variables will…
-
0
votes1
answer38
viewsQ: receive an object in a method of the same type as the method class
I’m passing a java code to python and came across it(cutting a few parts) public class TreeNode { public TreeNode(TreeNode pai) { how do I receive the father of the type Treenode in python? class…