Posts by Ramilson Silva • 9 points
3 posts
-
-3
votes3
answers83
viewsQ: I need to do a function that passes an n * m matrix, is transformed into a unidimesional tam n *m vector
int* Vetor_Unidim(int **matriz, int n, int m){ int *vetor = (int*)malloc((n*m)*sizeof(int)); int *p; p = *matriz; int tam = n*m; int i; for(i = 0; i<n;…
-
-1
votes2
answers32
viewsA: Copy a square matrix of tam n into another complemetar n-1, omitted row 0 and column 0 of matrix n
include include defines N (3) int main( void ) { int k,l; int i = 0; int j = 0; int mat[N][N]; int comp[N-1][N-1]; /* Preenche matriz 3x3 */ for( k = 0; k < N; k++ ) { for( l = 0; l < N; l++ )…
-
0
votes2
answers32
viewsQ: Copy a square matrix of tam n into another complemetar n-1, omitted row 0 and column 0 of matrix n
#include<stdio.h> #include<stdlib.h> #include<limits.h> #include<locale.h> int main(){ int i,j; int mat[3][3]; int comp[2][2]; …