Kolorwanie:
Status:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
<?php
class stereo{
	public function __construct(){
		echo "<hr>";
	}
	protected$r= 1;
	protected$a= 2;
	protected$b= 3;
	protected$c= 4;
	protected$H= 5;
	protected$l= 6;
	
	public function vk(){
		return 4/3*pi()*$this->r*$this->r*$this->r;
	}
	public function pk($r){
		return 4*pi()*pow($r,2);
	}
	public function pw($r, $H){
		return 2*pi()*pow($r,2)+2*pi()*$r*$H;
	}
	public function vw($r, $H){
		return pi()*pow($r,2)*$H;
	}
	public function ps($r, $l){
		return pi()*$r*($r+$l);
	}
	public function vs($r, $H){
		return 1/3*pi()*pow($r,2)*$H;
	}
	public function pp($a, $b, $c){
		return 2*($a*$b+$a*$c+$b*$c);
	}
	public function vp($a, $b, $c){
		return $a*$b*$c;
	}
}
$object= new stereo();
echo "objetoc kola: ".$object->vk();
echo "</br>";
echo "pole kola: ".$object->pk(1);
echo "</br>";
echo "pole walca: ".$object->pw(1, 5);
echo "</br>";
echo "objetosc walca: ".$object->vw(1,5);
echo "</br>";
echo "pole stozka: ".$object->ps(1, 6);
echo "</br>";
echo "objetosc stozka: ".$object->vs(1, 5);
echo "</br>";
echo "pole prostopadloscianu: ".$object->pp(2, 3, 4);
echo "</br>";
echo "objetosc prostopadloscianu: ".$object->vp(2, 3, 4);
echo "</br>";






$x = new stereo();

//echo var_dump($object);
//echo "</br>";
//echo var_dump($x);
//stozek policzyc, walec i prostopadlocian abc pola i objetosci.
?>

Copyrights 2014-2019 © Wklejaj.pl Wszelkie prawa zastrzeżone.