Questions tagged as 'matriz'

1
answer

Doubt about matrix values

   A good example of a data set is the booking of a flight ticket. Build a C program for booking airline tickets. The plane has 50 rows with 6 seats each. The program should have:       Two vectors whose number of positions is the total numbe...
asked by 24.02.2017 / 22:55
1
answer

Variable with multiple lists for array

Good evening. I have a text file where I have already converted your content to lists. Each line of the file has become a [] list, but now I need those lists all to be inside an array. This way I can not concatenate because there is only one var...
asked by 16.10.2015 / 03:30
1
answer

How to receive a value and store it in the position indicated by the user in an arrays array?

I did as follows: int matriz[][] = new int[numLinhas][numColunas]; //FOR PARA RECEBER OS VALORES E POSIÇÕES INFORMADAS PELO USUÁRIO for(int x=0; x<numLinhas; x++) { valor = Integer.parseInt(JOptionPane.showInputDialog("Info...
asked by 20.05.2015 / 05:59
1
answer

Problem attaching value to array in Python 2

The problem is in matrix.append([(x+1), vectorY[x][1]]) . As much as the value of vextor[x][1] is different from (x+1) , when it is added it will receive the same value of (x+1) , leaving an array with two equal values,...
asked by 06.11.2014 / 15:43
1
answer

Java Permeability

I'm having some difficulty solving a recursion problem, which I'll explain below. Given an array of n rows and columns, check whether there is permeability, ie having the following matrix (where '*' - represents open node and '-' - represents...
asked by 11.03.2014 / 17:05
0
answers

Pass numbers from input to array in Python

I'm doing an exercise on split graphs, in which input is given as follows: 6 2 4 5 1 3 2 3 5 1 0 2 2 1 1 1 Being 6 (the number of the first line) the number of lines to be read, and the other lines are about the vertices that have connectio...
asked by 28.11.2018 / 22:04
0
answers

Referencing a specific element of a bidimensional matrix via the pointer notation [closed]

C allows you to treat each row of a two-dimensional array as a one-dimensional array. As known, one way to reference two-dimensional arrays in the form of pointers in C is, for example: tabela[j][k] = *(*(tabela + j) + k) According to my...
asked by 11.11.2018 / 18:12
1
answer

How to represent an array in Prolog?

I'm doing a work in Prolog that basically consists of a search problem, there is a scenario in a two-dimensional environment and one must trace the path that a character must follow to reach the other. There are some obstacles and rules but my q...
asked by 23.10.2018 / 02:06
1
answer

How to calculate the sum of each row of a matrix in C?

I need to create an algorithm that reads the dimensions of an array, read the values to be placed in the array, with a vector calculate the sum of the values of each line and print the array and vector. This float soma computes the tota...
asked by 08.09.2018 / 17:46
0
answers

Why is the statement not being executed?

I am creating a program that sorts a matrix of structures, first sorts the rows and goes to each row and arranges them by columns. In the array that I am using at the end of two cycles the value of (i+1 = 4) , when I call again the functio...
asked by 28.04.2018 / 16:42