Ini adalah indexnya, atau tampilan awal pada saat di run

Ketika memasukkan jumlah persamaannya (3), akan tampil


Dan tampil hasilnya


Lanjutan..


Lanjutan..


Source Code: (Index)
<?php
function create_arr($array, $jumlah_persamaan) {
for($i = 1; $i <= $jumlah_persamaan; $i++) {
for($j = 1; $j <= $jumlah_persamaan + 1; $j++) {
if(isset($_GET[‘persamaan’.$i.$j])) {
$array[$i][$j] = $_GET[‘persamaan’.$i.$j];
}
}
}
return $array;
}function show($array, $heading) {
$jumlah = count($array) + 1;
echo “<table border=’1′ class=’tbl’ cellpading=’10’ cellspacing=’0′ width=’50%’ align=’center’>”;
echo “<thead><th colspan='”.$jumlah.”‘ style=’font-size:20px;’ align=’center’>$heading</th></thead>”;
$row = count($array);for($i = 1; $i < $row; $i++) {
$col = count($array[$i]);
echo “<tr align=’center’>”;
for($j = 1; $j <= $col; $j++) {
echo “<td width=’20%’>”;
echo number_format($array[$i][$j]);
echo “</td>”;
}
echo “</tr>”;
}
echo “</table>”;
}function change($array, $jumlah_persamaan) {function result($array, $jumlah_persamaan) {
for($i = 1; $i <= $jumlah_persamaan; $i++) {
$result_pivot = $i + 1;
$pivot = $array[$i][$i];
for($j = 1; $j <= $jumlah_persamaan + 1; $j++) {
$array[$i][$j] = $array[$i][$j] / $pivot;
}
for($k = 1; $k <= $jumlah_persamaan; $k++) {
if($k != $i) {
$pivot = $array[$k][$i];
for($l = 1; $l <= $jumlah_persamaan + 1; $l++) {
$array[$k][$l] = $array[$k][$l] – $pivot * $array[$i][$l];
}
}
$ubah_pivot = $k + 1;
$pivot_text = “Persamaan $result_pivot Menjadi Pivot Dan Persamaan $ubah_pivot Telah Di Ubah”;
show($array, $pivot_text);
}
}
return $array;
}
for($i = 1; $i <= $jumlah_persamaan; $i++) {
echo “<span style=’font-size:20px;’>X<sub>$i</sub> = </span>”;
for($j = 1; $j <= $jumlah_persamaan + 1; $j++) {
if($j > $jumlah_persamaan) {
echo $array[$i][$j].'<br>’;
}
}
}
}
?>
ConversionConversion EmoticonEmoticon