-
Notifications
You must be signed in to change notification settings - Fork 0
/
binario.php
66 lines (55 loc) · 1.53 KB
/
binario.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
session_start();
$semilla=$_GET["semilla"];
$mul = $_GET["mult"];
$mod = $_GET["mod"];
$cant = $_GET["cant"];
include "head.php";
include "js/sistemaBinario.php"
?>
<script>
$(document).ready( function () {
var table = $('#table1').DataTable();
} );
</script>
<div class="d-flex justify-content-around">
<div class="p-2">
<h1 class="text-slim text-default">Sistema Binario </h1>
</div>
<div class="p-2">
<a href="index.php" style="background-color: red; padding: 10px 10px; margin-top: 50px;">Volver</a>
</div>
</div>
<div class="container">
<!-- table class=table -->
<table id="table1" class="table table-bordered table-striped">
<thead>
<tr>
<th scope="col">$${N}$$</th>
<th scope="col">$${X_{n+1} = a * X_n \mod 32}$$</th>
<th scope="col">$${Ayuda}$$</th>
<!-- <th scope="col">Accion</th> -->
</tr>
</thead>
<tbody>
<?php
$fila = generarNum($semilla, $mul, $mod, $cant);
for ($i=1; $i < $cant; $i++){
echo "<tr>";
echo "<th style='text-align:center' scope='row'>".$fila[$i]["n"]."</th>";
echo "<td style='text-align:center'>".$fila[$i]["x_n"]."</td>";
echo "<td style='text-align:center'> \(".strval($mul)."*(".strval($fila[$i]["x_n"]).") \mod ".strval($mod)." = ".$fila[$i]["x_n1"]."\)</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<div class="p-2">
<a href="file.csv">Descargar Archivo CSV</a>
</div>
</div>
<?php
include("foot.php");
?>