wprowadzenie ziennych;
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <form method="post" action="licz.php"> <table border="0" width="50%"> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> </table> </form> <form method="post" action="sin.php"> <table border="0" width="50%"> <tr> </tr> <tr> </tr> <tr> </tr> </table> </form> <?php // put your code here ?> </body> </html>
Wielomian
<?php $a5 = $_POST['a5']; $a4 = $_POST['a4']; $a3 = $_POST['a3']; $a2 = $_POST['a2']; $a1 = $_POST['a1']; $a0 = $_POST['a0']; $b = $_POST['blad']; $pocz = 1; $kon = $_POST['kon']; $h = ($kon-$pocz) / $b; for ($i= 1; $i == $b; $i++){ $x1 = $pocz + (($i - 1)*$h); $x2 = $pocz + $i*$h; $f1 = (($a5*pow($x1, 5)) + ($a4*pow($x1, 4)) + ($a3*pow($x1, 3)) + ($a2*pow($x1, 2)) + ($a1*$x1) + $a0); $f2 = (($a5*pow($x2, 5)) + ($a4*pow($x2, 4)) + ($a3*pow($x2, 3)) + ($a2*pow($x2, 2)) + ($a1*$x2) + $a0); $pole = ($f1+$f2)*$h; } ?>
Sinus
<?php $h1 = rad2deg($_POS['h1']); $h2 = rad2deg($_POS['h2']); $wynik = -cos(rad2deg(180)); ?>
Trapezy nie działaja,
moze ktoś stwierdzić czemu ;?