Get the App
SLTechnology News&Howtos  ›  Development  › 

How to achieve factorial with PHP

Shulou Source: shulou.com Published: 2022-06-03 04:06:28 10月06日 Update

Editor to share with you how to achieve factorial PHP, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

Function factorial ($x) {if ($x > 1) {$s = $x * factorial ($x-1);} else {$s = $x;} return $s;} $x = 100 × echo $x. "factorial ($x)" is the factorial of "how to achieve factorial". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Factorials articles content not much most more knowledge industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MariaDB Xiaomi Shulou Tech Info Linux