Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define FIL 4
- #define COL 4
- float traza (float(*m)[COL]);
- int simetrica (float(*m)[COL]);
- int main (void){
- float mat[FIL][COL];
- int i,j;
- for(i=0;i<FIL;i++){
- for(j=0;j<COL;j++){
- printf("Introduzca los elementos de la matriz del %d %d \n",i+1,j+1);
- scanf("%f",&mat[i][j]);
- }
- }
- printf("La traza es: %f",traza(mat));
- return 0;
- system("pause");
- }
- float traza (float(*m)[COL]){
- int i,traza;
- for(i=0;i<FIL;i++){
- traza+=m[i][i];
- }
- return(traza);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement