Trade commissions - PHP
Здравейте,
не хващам какво пропускам, че да ми излиза програмата в judge след като в netbeans тръгва, моля помогнете Благодаря!
<?php
$city = strtolower(readline());
$sales = floatval(readline());
$commision = -1.0;
if ($city === "Sofia") {
if ($sales >= 0 && $sales <= 500) {
}
$commision = ($sales * 0.05);
} else if ($sales > 500 && $sales <= 1000) {
$commision = ($sales * 0.07);
} else if ($sales > 1000 && $sales <= 10000) {
$commision = ($sales * 0.08);
} else if ($sales > 10000) {
$commision = ($sales * 0.12);
}
else if ($city === "Varna") {
} else if ($sales >= 0 && $sales <= 500) {
$commision = $sales * 0.045;
} else if ($sales > 500 && $sales <= 1000) {
$commision = $sales * 0.075;
} else if ($sales > 1000 && $sales <= 10000) {
$commision = $sales * 0.1;
} else if ($sales > 10000) {
$commision =($sales * 0.13);
} else if ($city === "Plovdiv") {
} else if ($sales >= 0 && $sales <= 500) {
$commision = ($sales * 0.055);
} else if ($sales > 500 && $sales <= 1000) {
$commision = ($sales * 0.08);
} else if ($sales > 1000 && $sales <= 10000) {
$commision = ($sales * 0.12);
} else if ($sales > 10000) {
$commision = ($sales * 0.145);
}
if ($commision >= 0) {
printf("%0.2f", $commision);
} else {
echo "error" . PHP_EOL;
}