Welcome
You did not select course
";
else
{
$n = count($course);
printf ("You have selected %1d course(s)
", $n);
print "Course(s) selected: ";
for ($i = 0; $i < $n; $i++)
{
if ($i > 0)
print " and ";
printf ("%10s", $course[$i]);
}
print "";
if ($n == 1)
$price = 150;
elseif ($n == 2)
$price = (150*2)*0.9;
printf ("
Total bill is %6.2f ", $price);
}
?>
No payment plan selected";
else
{
printf ("
Payment plan: %d ", $payment);
printf ("
You will be charged %d payments of %6.2f ", $payment, $price/$payment);
}
?>