Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Algorithems/Data Manipulation copy/Matrices/Display.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include<stdio.h>
#include<stdlib.h>
#include"display.h"
// by debbah Mehdi Sofiane
// file containt display and create fonction for matrix

// fonction to create matrix allocation
int ** create_Matrix(int n ){
int i ; int **tab ;
//memory allocation for matrix
tab= (int**)(malloc(n* sizeof(int*))) ;
for( i=0;i<n;i++) tab[i]=(int *)( malloc(n*sizeof(int)));
return tab;

}

// fonction to fill in the matrix desired value
void fill_Matrix (int n, int **tab , int value){
// fill in the matrix
int i=0 ,j;
while( i<n){
j=0;
while(j<n){ tab[i][j]= value ;j++ ;}
i++;}

}


// fonction to show matrix
void show_Matrix(int**t, int n){
int i,j;
for( i=0;i<n;i++) {
for( j=0;j<n;j++){
printf("%d \t",t[i][j]);
}

printf("\n");

}
}

/*int main(){



return 0;
}*/