1 && $x<10){ $y=tan($x-1); } else if ($x<=-1 ||$x>=10){ $y=1; } else{ $y="Wrong value of x!"; } echo "Result of first task is: ".$y."
"; //task 2 //subtask a echo "Result of second task (a) is: "."
"; $x=0; while($x<=0.4){ $z=(asin(2*$x)+abs($x))/($x*$x+1); echo $z."
"; $x+=0.2; } //subtask b echo "Result of second task (b) is: "."
"; $x=0.1; for($i=0;$i<6;$i++){ $z=(asin(2*$x)+abs($x))/($x*$x+1); echo $z."
"; $x+=0.05; } //task 3 $S=0; echo "Result of third task is: "."
"; for($l=3;$l<=13;$l++){ $S+=pow(-1,$l)*($l*$l+1)/($l+2); } echo $S."
"; $p=1; $k=3; $n=8; for ($i=$k; $i<=$n; $i++){ $p*=($i-1)/($i*$i+5); } echo $p."
"; //task 4 $c=[-3.6,-5.3,2.1,0.1,-0.7,5.3,6.6,2.2]; $maxAbs=abs($c[0]); for($i=1;$i$maxAbs){ $maxAbs=$c[$i]; } } echo "Result of fourth task is: ".$maxAbs."
"; ?>