码迷,mamicode.com
首页 > Web开发 > 详细

php 求商数和余数 的函数

时间:2019-11-21 16:42:55      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:ret   UNC   cti   turn   array   and   return   rand   pre   

//返回两数相除之商和余数
function get_div_and_mod($left_operand, $right_operand)
{
$div = intval($left_operand / $right_operand);
$mod = $left_operand % $right_operand;
return array($div, $mod);
}

php 求商数和余数 的函数

标签:ret   UNC   cti   turn   array   and   return   rand   pre   

原文地址:https://www.cnblogs.com/erinmin/p/11906546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!