Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Zadanie</title>
- </head>
- <body>
- <?php
- class prostopadloscian
- {
- public $pole;
- public $objetosc;
- public $a;
- public $b;
- public $h;
- function pole(){
- $pole = 2*$this->$a*2*$this->$b+2*$this->$b*2*$this->$h+2*$this->$a*2*$this->$h;
- return $this->pole;
- }
- }
- $c=new prostopadloscian();
- $c->a="300";
- $c->b="200";
- $c->h="100";
- $c->pole;
- print("Długość:".$c->a."<br>");
- print("Szerokość:".$c->b."<br>");
- print("Wysokość:".$c->h);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement