Questions tagged as 'matriz'

1
answer

Fill char array with random words [closed]

I'm trying to develop an algorithm able to get a vector of strings, sort by word size in descending order and place them inside an array of char embedding if possible all words. The idea of everything would be how to create a grid and make the w...
asked by 20.09.2016 / 12:52
2
answers

Create new array from a fairly large first array efficiently

Dear, in R, I have a very large database and I want to create new columns. I will try to explain my problem with a very small matrix. Next, "1" means private school and "2", publishes. I have for example a database >Data Casa Escola 1...
asked by 16.08.2014 / 00:21
1
answer

How to convert a JavaScript array to array in PHP?

The system gives me a JavaScript matrix to work on the page. I can get this array with PHP, but I do not know how to convert from JavaScript to PHP and work using PHP. This is an example of the JavaScript array: <script type="text/...
asked by 02.03.2015 / 04:04
1
answer

Matrix of strings

How do I declare and start an array of strings ? I tried in many ways and I still did not succeed, I thought it would work fine but it did not work. #include <stdio.h> #include <stdlib.h> int main(void){ char matriz[2...
asked by 05.09.2017 / 14:38
1
answer

Brute force algorithm for game resolution Sudoku in C

I have the following code written in C : #include <stdio.h> #include <stdlib.h> #include <time.h> // Variáveis globais int jogo_tabuleiro[9][9] = {0}; int func_quadrante(int quadrante, int numero) { int linha_inic...
asked by 28.06.2016 / 06:00
2
answers

What is happening in my C program?

I just have to add the lines but the values do not make sense: Hereisthecode:#include<stdio.h>#include<stdlib.h>intmain(){intmatriz[6][6],i,h,somalinha[6];for(i=0;i<=4;i++){for(h=0;h<=4;h++){printf("Digite os valores de uma...
asked by 12.12.2016 / 04:56
3
answers

Rotate matrix in 90º

I need to create an algorithm in C to rotate a 10x10 matrix by 90 degrees, though I can not use an auxiliary array for that. Simplifying what was asked to try to find some pattern and use it to solve the problem I used a 3x3 array and compare...
asked by 24.08.2015 / 15:53
1
answer

Calculating a magic square

I'm trying to make a magic square: A magic square is one that is divided into rows and columns, with a number in each position and the sum of rows, columns, and diagonals is the same. Example (3x3 - no. 1 to 9): 8 3 4 1 5 9...
asked by 21.11.2015 / 19:00
1
answer

Matrix operations with no set size

I need to perform operations on an array that will be passed by parameter, the problem is that its size is not fixed so I do not know how to loop to go to the end of a column or row for example. private static void calcularMatriz(int[][] matri...
asked by 22.08.2015 / 23:46
1
answer

Segmentation fault: branch and bound in c

I'm having a persistent error in my code. My goal is to find the path in a maze mounted on an array with an algorithm of type branch and bound . Here is the code: FILE *ent; FILE *saida; int NL; int temp; char c; struct labirintos{ int **...
asked by 24.02.2015 / 02:52