Lea un Array A de 10 filas y 5 columnas todos números enteros positivos
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Lea un Array A de 10 filas y 5 columnas todos números enteros positivos</title>
<style type="text/css">
<!--
.Estilo1 {font-family: "Comic Sans MS"}
body {
background-image: url(WP_YoshiMain_1280x1024_001.jpg);
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="trabajo_2.php">
<table width="935" border="0" align="center">
<tr>
<td width="925"><h1 align="center" class="Estilo1">MATRIZ A</h1>
<table width="629" height="284" border="4" align="center" bordercolor="#66FF00">
<tr>
<td width="122"><input name="i1" type="text" size="20" /></td>
<td width="116"><input name="i2" type="text" size="20" /></td>
<td width="119"><input name="i3" type="text" size="20" /></td>
<td width="119"><input name="i4" type="text" size="20" /></td>
<td width="119"><input name="i5" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i6" type="text" size="20" /></td>
<td><input name="i7" type="text" size="20" /></td>
<td><input name="i8" type="text" size="20" /></td>
<td><input name="i9" type="text" size="20" /></td>
<td><input name="i10" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i11" type="text" size="20" /></td>
<td><input name="i12" type="text" size="20" /></td>
<td><input name="i13" type="text" size="20" /></td>
<td><input name="i14" type="text" size="20" /></td>
<td><input name="i15" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i16" type="text" size="20" /></td>
<td><input name="i17" type="text" size="20" /></td>
<td><input name="i18" type="text" size="20" /></td>
<td><input name="i19" type="text" size="20" /></td>
<td><input name="i20" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i21" type="text" size="20" /></td>
<td><input name="i22" type="text" size="20" /></td>
<td><input name="i23" type="text" size="20" /></td>
<td><input name="i24" type="text" size="20" /></td>
<td><input name="i25" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i26" type="text" size="20" /></td>
<td><input name="i27" type="text" size="20" /></td>
<td><input name="i28" type="text" size="20" /></td>
<td><input name="i29" type="text" size="20" /></td>
<td><input name="i30" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i31" type="text" size="20" /></td>
<td><input name="i32" type="text" size="20" /></td>
<td><input name="i33" type="text" size="20" /></td>
<td><input name="i34" type="text" size="20" /></td>
<td><input name="i35" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i36" type="text" size="20" /></td>
<td><input name="i37" type="text" size="20" /></td>
<td><input name="i38" type="text" size="20" /></td>
<td><input name="i39" type="text" size="20" /></td>
<td><input name="i40" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i41" type="text" size="20" /></td>
<td><input name="i42" type="text" size="20" /></td>
<td><input name="i43" type="text" size="20" /></td>
<td><input name="i44" type="text" size="20" /></td>
<td><input name="i45" type="text" size="20" /></td>
</tr>
<tr>
<td height="26"><input name="i46" type="text" size="20" /></td>
<td><input name="i47" type="text" size="20" /></td>
<td><input name="i48" type="text" size="20" /></td>
<td><input name="i49" type="text" size="20" /></td>
<td><input name="i50" type="text" size="20" /></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value="Enviar" align="center"/>
</label>
</p>
<p> </p></td>
</tr>
</table>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Lea un Array A de 10 filas y 5 columnas todos números enteros positivos</title>
<style type="text/css">
<!--
.Estilo7 {font-family: "Comic Sans MS"; color: #003300; }
.Estilo8 {font-family: "Comic Sans MS"}
body {
background-image: url(WP_YoshiMain_1280x1024_001.jpg);
}
-->
</style>
</head>
<body>
<table width="890" border="0" align="center">
<tr>
<td width="884"><h1 align="center" class="Estilo8">MATRIZ A </h1>
<table width="35" height="29" border="3" align="center" bordercolor="#66CC00">
<tr>
<td><?php
$arreglo = array(array($_POST[i1],$_POST[i2],$_POST[i3],$_POST[i4],$_POST[i5]),array($_POST[i6],$_POST[i7],$_POST[i8],$_POST[i9],$_POST[i10]),array($_POST[i11],$_POST[i12],$_POST[i13],$_POST[i14],$_POST[i15]),array($_POST[i16],$_POST[i17],$_POST[i18],$_POST[i19],$_POST[i20]),array($_POST[i21],$_POST[i22],$_POST[i23],$_POST[i24],$_POST[i25]),array($_POST[i26],$_POST[i27],$_POST[i28],$_POST[i29],$_POST[i30]),array($_POST[i31],$_POST[i32],$_POST[i33],$_POST[i34],$_POST[i35]),array($_POST[i31],$_POST[i32],$_POST[i33],$_POST[i34],$_POST[i35]),array($_POST[i36],$_POST[i37],$_POST[i38],$_POST[i39],$_POST[i40]),array($_POST[i41],$_POST[i42],$_POST[i43],$_POST[i44],$_POST[i45]));
?><table width="569" height="212" border="1" bordercolor="#009900" bgcolor="#FFFFFF" align="center"
><?php
echo "<tr>";
for($i=0;$i<10;$i++){
for($j=0;$j<5;$j++){
echo "<td>",$arreglo[$i][$j],"</td>";
}
echo "<tr>";
}
?>
</table>
</td>
</tr>
</table>
<table width="939" border="0">
<tr>
<td width="200"><h3><span class="Estilo7">La suma de cada una de las filas de A</span></h3></td>
<td width="565"><h3><span class="Estilo7">La suma de cada una de las columnas de A</span></h3></td>
<td width="160"><h3><span class="Estilo7">Encuentre la mayor suma de las filas de A</span></h3></td>
</tr>
<tr>
<td><table width="200" height="292" border="5" bordercolor="#66CC00">
<tr>
<td width="96"><h4><span class="Estilo8">1ra Fila </span></h4></td>
<td width="88"><?php $_POST[f1] = ($_POST[i1] + $_POST[i2] + $_POST[i3] + $_POST[i4] + $_POST[i5]);
echo $_POST[f1];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">2da Fila </span></h4></td>
<td><?php $_POST[f2] = ($_POST[i6] + $_POST[i7] + $_POST[i8] + $_POST[i9] + $_POST[i10]);
echo $_POST[f2];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">3ra Fila </span></h4></td>
<td><?php $_POST[f3] = ($_POST[i11] + $_POST[i12] + $_POST[i13] + $_POST[i14] + $_POST[i15]);
echo $_POST[f3];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">4ta Fila </span></h4></td>
<td><?php $_POST[f4] = ($_POST[i16] + $_POST[i17] + $_POST[i18] + $_POST[i19] + $_POST[i20]);
echo $_POST[f4];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">5ta Fila </span></h4></td>
<td><?php $_POST[f5] = ($_POST[i21] + $_POST[i22] + $_POST[i23] + $_POST[i24] + $_POST[i25]);
echo $_POST[f5];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">6ta Fila </span></h4></td>
<td><?php $_POST[f6] = ($_POST[i26] + $_POST[i27] + $_POST[i28] + $_POST[i29] + $_POST[i30]);
echo $_POST[f6];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">7ma Fila </span></h4></td>
<td><?php $_POST[f7] = ($_POST[i31] + $_POST[i32] + $_POST[i33] + $_POST[i34] + $_POST[i35]);
echo $_POST[f7];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">8va Fila </span></h4></td>
<td><?php $_POST[f8] = ($_POST[i36] + $_POST[i37] + $_POST[i38] + $_POST[i39] + $_POST[i40]);
echo $_POST[f8];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">9na Fila </span></h4></td>
<td><?php $_POST[f9] = ($_POST[i41] + $_POST[i42] + $_POST[i43] + $_POST[i44] + $_POST[i45]);
echo $_POST[f9];?></td>
</tr>
<tr>
<td><h4><span class="Estilo8">10ma Fila </span></h4></td>
<td><?php $_POST[f10] = ($_POST[i46] + $_POST[i47] + $_POST[i48] + $_POST[i49] + $_POST[i50]);
echo $_POST[f10];?></td>
</tr>
</table></td>
<td><table width="551" height="71" border="5" bordercolor="#66CC00">
<tr>
<td width="95"><h4><span class="Estilo8">1ra Columna </span></h4></td>
<td width="94"><h4><span class="Estilo8">2da Columna </span></h4></td>
<td width="108"><h4><span class="Estilo8">3ra Columna </span></h4></td>
<td width="112"><h4><span class="Estilo8">4ta Columna </span></h4></td>
<td width="100"><h4><span class="Estilo8">5ta Columna </span></h4></td>
</tr>
<tr>
<td><?php $_POST[c1] = ($_POST[i1] + $_POST[i6] + $_POST[i11] + $_POST[i16] + $_POST[i21] + $_POST[i26] + $_POST[i31] + $_POST[i36] + $_POST[i41] + $_POST[i46]);
echo $_POST[c1];?></td>
<td><?php $_POST[c2] = ($_POST[i2] + $_POST[i7] + $_POST[i12] + $_POST[i17] + $_POST[i22] + $_POST[i27] + $_POST[i32] + $_POST[i37] + $_POST[i42] + $_POST[i47]);
echo $_POST[c2];?></td>
<td><?php $_POST[c3] = ($_POST[i3] + $_POST[i8] + $_POST[i13] + $_POST[i18] + $_POST[i23] + $_POST[i28] + $_POST[i33] + $_POST[i38] + $_POST[i43] + $_POST[i48]);
echo $_POST[c2];?></td>
<td><?php $_POST[c4] = ($_POST[i4] + $_POST[i9] + $_POST[i14] + $_POST[i19] + $_POST[i24] + $_POST[i29] + $_POST[i34] + $_POST[i39] + $_POST[i44] + $_POST[i49]);
echo $_POST[c4];?></td>
<td><?php $_POST[c5] = ($_POST[i5] + $_POST[i10] + $_POST[i15] + $_POST[i20] + $_POST[i25] + $_POST[i30] + $_POST[i35] + $_POST[i40] + $_POST[i45] + $_POST[i50]);
echo $_POST[c5];?></td>
</tr>
</table></td>
<td> </td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
</table>
</body>
</html>
Aplicacion hecha en Macromedia Dreamwaver
lenguaje:php y html
descripcion:imprime una matriz de 10*5 utilizando un formulario previo
donde clasifica los numeros enteros positivos
lenguaje:php y html
descripcion:imprime una matriz de 10*5 utilizando un formulario previo
donde clasifica los numeros enteros positivos
Comentarios
Publicar un comentario