【发布时间】:2021-10-08 16:25:20
【问题描述】:
想知道我所有客户之间软件更新广告的成功率(百分比)。
我有以下公式,但我认为有问题(基于初步结果),请参阅:
$success = round((($total_pcs_with_new_version) + (($total_pcs_with_old_version)))/100, 2);
/**
[====== Preliminary result ======]
$total_pcs_with_new_version = 13;
$total_pcs_with_old_version = 23
then result will be:
$success = 0.36%
**/
【问题讨论】:
-
您希望
(thing / total) * 100获得标准人类可读形式的百分比
标签: php math calculation