I've tried to port the following sum in a php for loop
Bu yol:
$prod = 1;
for($i=0;$i<$_POST["capacity"];$i++){
$prod = $prod * (($_POST["capacity"] - (i+1)) / $toffered);
}
?>
p(c) is: <?php echo floatval(1.00/floatval((1+ floatval($prod)))); ?><br /> <br />
ama nedense bana yanlış sonuç verebilir gibi görünüyor. Yanlış ne olduğu hakkında ipuçları?
EDIT: i've modified the initial value of prod as well as adding brackets for i+1 which is subtracted from the capacity. The results aren't better still.