<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>
<BR>Muchas gracias amigo disculpa que no haya podido responder antes, ahora si no es molestia me podria indicar como hacer una matriz.<BR>
en donde me pide multiplicar un escalar por una matriz de 4*4, me ingrese una matriz de entrre # de 2 y 50 pares por teclado luego calcule el numero de la matriz.<BR>
de antemano nuevamente muchas gracias.<BR>
<BR> <BR>
<DIV>
<FONT face="Lucida Handwriting, Cursive" size=4><FONT face="Geneva, Arial, Sans-serif">G</FONT><FONT face=Wingdings>b</FONT><FONT face="Geneva, Arial, Sans-serif">BRIEL G<FONT face=Wingdings>b</FONT>LE<FONT face=Wingdings>b</FONT>S</FONT></FONT><BR>
<FONT face="Times New Roman, Times, Serif" size=3>Técnico en computación.</FONT><BR>
<FONT face=Arial size=2>Mantenimiento preventivo y correctivo de Pc´s</FONT><BR></DIV><BR><BR>> From: mcam_7c6@hotmail.com<BR>> To: cconclase@listas.conclase.net<BR>> Date: Fri, 22 Jun 2007 20:53:55 +0000<BR>> Subject: Re: [C con Clase] Matriz de 4x4<BR>> <BR>> <BR>> El 22 de Junio de 2007 Gabriel escribio:<BR>> <BR>> <BR>> >Buenas tardes amigos del C++ necesito de su ayuda como resuelvo una matriz <BR>> >de 4*4 que me pide la<BR>> >primera matriz me ingrese datos por teclado, la segunda matriz se llena <BR>> >aleatoriamente por numeros<BR>> >entre 1 y 50, luego sumar las dos matrices en una tercera matriz .<BR>> >es algo basico estoy empezando sin punteros ni funciones que aun no veo eso<BR>> >de antemano agradezco su ayuda<BR>> <BR>> Acá te paso el código para realizar una suma de matrices en los terminos que <BR>> estableciste, espero que te sirva, suerte.<BR>> <BR>> <BR>> /* Se requieren estos encabezadores */<BR>> #include <stdlib.h> // srand() y rand()<BR>> #include <stdio.h> // printf() y scanf()<BR>> #include <time.h> // time()<BR>> <BR>> /* Las tres matrices */<BR>> int matriz1[4][4];<BR>> int matriz2[4][4];<BR>> int matriz3[4][4];<BR>> <BR>> /* Contadores para los bucles */<BR>> int i, j;<BR>> <BR>> /* Pide al usuario que ingrese los datos de la primera matriz */<BR>> for(i=0; i<4; i++)<BR>> {<BR>> for(j=0; j<4; j++)<BR>> {<BR>> printf("Elemento (%i,%i):", i, j);<BR>> scanf("%i", &(matriz1[4][4])); // El & tienen que ver con punteros, <BR>> es inevitable<BR>> }<BR>> }<BR>> <BR>> /* Establece los datos de la segunda matriz */<BR>> srand(time(NULL)); // Inicializa los números aleatorios<BR>> <BR>> for(i=0; i<4; i++)<BR>> {<BR>> for(j=0; j<4; j++)<BR>> {<BR>> matriz2[i][j] = rand() % 51 + 1;<BR>> }<BR>> }<BR>> <BR>> /* Realiza la suma de matrices */<BR>> for(i=0; i<4; i++)<BR>> {<BR>> for(j=0; j<4; j++)<BR>> {<BR>> matriz3[i][j] = matriz1[i][j] + matriz2[i][j];<BR>> }<BR>> }<BR>> <BR>> _________________________________________________________________<BR>> Consigue aquí las mejores y mas recientes ofertas de trabajo en América <BR>> Latina y USA: http://latam.msn.com/empleos/<BR>> <BR>> <BR>> _______________________________________________<BR>> Lista de correo Cconclase Cconclase@listas.conclase.net<BR>> http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net<BR>> Bajas: http://listas.conclase.net/index.php?gid=2&mnu=FAQ<BR><br /><hr />Consigue el nuevo Windows Live Messenger <a href='http://get.live.com/messenger/overview' target='_new'>Pruébalo</a></body>
</html>