<title>Credito</title>
</head>
<body>
<form method="POST" action="Mostrar.php">
Ingresa el importe:<br>
<input type="text" name="Importe">
<br>
Ingresa las cuotas:<br>
<input type="text" name="Cuotas">
<br>
<input type="submit" value="Ingresar">
</form>
</body>
</html>
<html>
<?php
$numero= $_POST['Importe'];
$cuotas= $_POST['Cuotas'];
$interes= $numero / 10;
$final= $numero + $interes;
$pura= 5000 / $cuotas;
$importe_interes= (($numero /10) /$cuotas);
$cuota_final= $pura + $importe_interes;
echo "<TABLE BORDER=1>";
echo "<TR> <TD> Cuotas </TD> <TD> Pura </TD> <TD> Interes 10% </TD> <TD>Cuota Final</TD></TR>";
for ($i = 1; $i <= $cuotas; $i++){
echo "<TR><TD>$i </TD>";
}
for ($p=$pura; $p<=$cuotas; $p++){
echo "<TD>$p</TD></TR>";
}
echo "<TR> <TD> Total </TD> <TD>$numero </TD><TD>$interes</TD> <TD> $final</TR>";
$importe = $_POST['Importe'];
$cuotas= $_POST['Cuotas'];
$pura= $importe / $cuotas;
$interes= ($pura * 10) / 100;
$cuota_final = $pura + $interes;
$total_pura = $pura * cuotas;
$total_interes = $interes * cuotas;
$total_cuota = $cuota_final * cuotas;
echo "<TABLE BORDER=1>";
echo "<TR> <TD> Cuotas </TD> <TD> Pura </TD> <TD> Interes 10% </TD> <TD>Cuota Final</TD></TR>";
for ($i = 1; $i <= $cuotas; $i++) {
echo "<tr>";
echo "<td>$i</td>";
echo "<td>$pura</td>";
echo "<td>$interes</td>";
echo "<td>$cuota_final</td>";
echo "<tr>";
}
// Muestra totales
echo "<tr>";
echo "<td>TOTAL</td>";
echo "<td>$total_pura</td>";
echo "<td>$total_interes</td>";
echo "<td>$total_cuota</td>";
echo "<tr>";
echo "</TABLE";