$j = 0; $k = 0;$m = 0;
for ($i = 0;$i < 1000;$i++)
{
$a1 = rand(1,9);
$a2 = rand(1,9);
$a3 = rand(1,9);
if ($a1+$a2+$a3 == = 15)
$m++; "There are duplicate values".$a1."+".$a2."+".$a3."n";
$j++; $a1."+".$a2."+".$a3."=15"."n";
$k++; The number of times 15 is ".$m." The number of times n is equal to 15 but is repeated is ".$j." The number of times n is equal to 15 and there is no repetition is ".$k.";
http://www.bkjia.com/PHPjc/364661.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/364661.html
TechArticle
?php $j = 0; $k = 0;$m = 0; for ($i = 0; $i 1000;$i++) { $a1 = rand(1,9); $a2 = rand(1,9); $a3 = rand(1,9); if ($a1+$a2+$a3 === 15 ) { $m++; if($a1 === $a2 or $a1 === $a3 or $a2 === $...