subject

Basicamente en un programa de matrices donde hay que formar una cruz y una diagonal con 1 y ya está la cruz y las diagonales de 1 (? pero esa parte donde tengo que hacer la mitad de 2 me hace explotar
Alguien me dice que tengo que hacer porfavor

//matriz
#include
#define maxfil 100
#define maxcol 100
void llenar (int [maxfil][maxcol],int, int);
void mostrar (int[][maxcol],int, int);

main()
{ int M[maxfil][maxcol];
int n, m;//filas y columnas reales
n=11;
m=11;
llenar(M, n,m);
mostrar(M, n,m);
}
//construot funcione
void llenar (int X[maxfil][maxcol],int n, int m)
{int i, j;//indice i pra filas y j pra columnas
for(i=0;i { for(j=0;j {X[i][j]=0;
}
}
for(i=0;i {X[n/2][i]=1;
}
for(i=0;i {X[i][n/2]=1;
}
for(i=0;i {for(j=0;j {if(n==m)
{X[i][i]=1;
}
else
{X[i][i]=0;
}
}
}
for(i=0;i {X[i][(n-1)-i]=1;
}

}

void mostrar (int X[][maxcol],int n, int m)
{int i, j;//indice i pra filas y j pra columnas
for(i=0;i { printf("\n");
for(j=0;j {printf("%d ",X[i][j]);
}
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 17:10
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi,be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
You know the right answer?
Basicamente en un programa de matrices donde hay que formar una cruz y una diagonal con 1 y ya está...
Questions
question
Chemistry, 14.06.2021 05:10
question
Mathematics, 14.06.2021 05:10
question
Chemistry, 14.06.2021 05:10
question
History, 14.06.2021 05:10
Questions on the website: 13722367