Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function iloczynliczb($zbiorA,$zbiorB)
- {
- $wynik=Array();
- for($l=0;$l<count($zbiorA);$l++)
- {
- if(in_array($zbiorA[$l], $zbiorB))
- {
- $wynik[]=$zbiorA[$l];
- return $wynik;
- }
- }
- }
- public function iloczyn()
- {
- echo("Iloczyn:");
- if(count($this->zbiory)>0)
- {
- $this->wynik=$this->zbiory[0];
- for($i=1;$i<count($this->zbiory);$i++)
- {
- $this->wynik=$this->iloczynliczb($this->zbiory[$i],$this->wynik);
- }
- }
- else
- {
- $this->wynik=Array();
- }
- }
- function suma ($first,$second) {
- 2
- 3
- return $first | $second;
- 4
- }
- function iloczyn ($first,$second) {
- 2
- 3
- return $first & $second;
- 4
- }
- function roznica ($first,$second) {
- 2
- 3
- return $first & ~$second;
- 4
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement