Red de conocimientos sobre prescripción popular - Conocimiento del confinamiento - Conformación de matrices
Conformación de matrices
Espere un momento. Estará listo pronto. Escribiré el código fuente para usted.
Finalmente, aquí está el código:
//Transponer una matriz con forma de 3*3 en lenguaje C,
# include & ltstdio.h & gt
void main()
{?int a[3][3];
int b[3][3]; >int i, j, t = 0;
Printf("Ingrese 9 elementos de la matriz original"
for(I = 0; i<3;i++ ) p>
for(j = 0; j & lt3;j++)
{?++ t;
scanf("%d ", & ampa[ I][ j]);
If (t%3==0)
{
printf(" \ n ");
}
}//Matriz de inicialización;
for(I = 0;i<3;i++)
for(j = 0;j & lt3;j++)
b[j][I]= a[I][j];
printf(" \ n ");
Printf("El convertido la matriz es:\ n ");
t = 0;
for(I = 0;i<3;i++)
for(j = 0; j & lt3;j++)
{
++ t;
printf(" %d ", b[I] [j]);
If (t%3==0)
printf(" \ n ");
}
Printf("Gracias por usar * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
}
Este es el resultado de mi carrera: