math problem
| From: | Bastiaan K | Date: | Sun, 13 Apr 2003 20:41:41 +0000 |
| Subject: | math problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143693@lists.php.net to get a copy of this message | ||
When I supply the script below with these values:
$Age = 23, $Loan = 5000, $Salary = 25000
I don't get the expected result: "YES, we are etc."
Could someone please explain why?
Thanks a lot, Bastiaan
You can double check the script at www.dreyershofje.nl
<?php
$SalaryAllowance = $Salary/5;
$AgeAllowance = ($Age/10 - ($Age%10)/10)-1;
$LoanAllowance = $SalaryAllowance * $AgeAllowance;
echo "Loan wanted: $Loan";
echo "Loan amount we will allow: $LoanAllowance";
if ($Loan <= $LoanAllowance) echo "YES, we are delighted to accept your
application";
if ($Loan > $LoanAllowance) echo "Sorry, we cannot accept your application
at this time";
?>