Questions tagged as 'algoritmo'

0
answers

Program does not execute the two For loops inside the if - C [closed]

I have 2 links in an if , as shown below: if (grid[j][k] == words[i][0]){ int el = j, col = k; //Metodo direita, baixo for(l=0;l < wordlen(search_word);l++){...
asked by 20.09.2018 / 01:58
1
answer

Dijkstra Algorithm - How do I change the reading of the txt file in C to be identified in int and not string?

Good evening, I have a question about how to change the reading of the txt file, where the compiler identifies with char however within the file that I need to read, have only numbers, could anyone help me? Attached is the error you are repor...
asked by 10.09.2018 / 17:12
0
answers

Recursion - Why am I entering a loop?

I'm trying to implement an algorithm called minimax, but I'm having trouble recursively, it goes into a loop which I can not figure out why. The depth of the algorithm should vary according to the moves that are tested, but the depth that occurs...
asked by 08.06.2018 / 05:11
1
answer

Referencing local coordinate system in python

I'm developing a 3D structural calculation software and I need to reference the local coordinate system of the bars. We define that the x-axis will always coincide with the central axis of the bar, the z-axis will be perpendicular to the global...
asked by 19.05.2018 / 15:18
1
answer

Specifying height and sex of students with a "while"

The exercise asks me to read 20 students and their respective heights and sex, and then show the average height and how many men and women we have. What I did was the following: int main() { float altura, media; char gen, mediam, me...
asked by 09.04.2018 / 15:15
1
answer

Program stops responding when I try to fill in the list

This is the code, it simply leverages the values and puts them in the list, but in the last loop it stops responding #include<stdio.h> #include<stdlib.h> typedef struct pessoa { int horas,minutos; int conversao; int ate...
asked by 11.11.2017 / 22:38
0
answers

Script php to know how many possible combinations you can have [closed]

I would like to create a simple script, just to know the number of possible combinations. You would not see the list of combinations, but only how many digits you can have, and the numbers and or letters can be reordered. Ex : $Valores = "...
asked by 04.12.2017 / 21:32
1
answer

Cycles in graphs

I am creating an algorithm that identifies if a graph contains cycles deleted the fonts recursively, returning the graph for later verification of the amount of edge, for this create the following code for adjacency matrices: Graph GRAPHisCycl...
asked by 22.09.2017 / 02:36
0
answers

exercise in visual algorithm [closed]

The consumer cost of a new car is the sum of the factory cost with the dealer percentage and the taxes, both applied to the factory cost. It is known that the percentages are the same as those in the following table. Make a program that takes th...
asked by 11.09.2017 / 14:13
1
answer

Help with code in Visualg

I'm trying to make this snippet of my code work enquanto(n <> "s") e (n <> "n") faca escreva("") leia(n) fimenquanto but it returns this error     
asked by 03.10.2017 / 00:01