note 86415 added to missing-stuff

From: Date: Fri, 17 Oct 2008 13:26:28 +0000
Subject: note 86415 added to missing-stuff
Groups: php.notes 
Request: Send a blank email to php-notes+get-145449@lists.php.net to get a copy of this message
In the Math library, 2 function are missed: 1.) Factorial function 2.) Combines function 1.) CODE: <?PHP function factorial ($n) { if ($n == 0) { return 1; } return $n * factorial($n - 1); } ?> 2.) CODE: <?PHP function combinari ($n,$k) { if (0 <= $k && 0 <= $n && $k <= $n) { $combinari = factorial ($n) / (factorial ($k) * (factorial ($n - $k))); } else { print 'Calculul efectuat este imposibil, combinari de N luate cate K ( K mai mic sau egal cu N )!'; } return $combinari; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 89.137.186.220 ---- Manual Page -- http://www.php.net/manual/en/missing-stuff.php Edit -- https://master.php.net/note/edit/86415 Del: integrated -- https://master.php.net/note/delete/86415/integrated Del: useless -- https://master.php.net/note/delete/86415/useless Del: bad code -- https://master.php.net/note/delete/86415/bad+code Del: spam -- https://master.php.net/note/delete/86415/spam Del: non-english -- https://master.php.net/note/delete/86415/non-english Del: in docs -- https://master.php.net/note/delete/86415/in+docs Del: other reasons-- https://master.php.net/note/delete/86415 Reject -- https://master.php.net/note/reject/86415 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145449) next »