It’s just a work in progress at the moment, but I’d appreciate some help, again.
I’m writing a program for a delivery service where there are following conditions.
For orders worth less than £25 the delivery charge is £3.00.
Orders worth at least £25 but less than £100 are delivered free.
Orders worth £100 or more are delivered free and in addition the
customer receives a free gift. I prompt the user to enter the order value, and tell him/her which band he comes under.
This is what I have so far, and it doesn’t seem to be it, evidently.
[code]
<html>
<body>
<script type=’text/javascript’>
// A delivery charge program
var ordervalue // how much the order is worth
ordervalue = window.prompt (‘How much is the order worth in Pounds Sterling?’,”);
document.write (‘The value of your order is £’ + ordervalue + ‘.<BR>’);
if ordervalue =< 25
{
document.write(‘Your delivery will cost £3 as your order value is’ + ‘£’ + ordervalue + ‘.<BR>’);
if ordervalue > 25 and ordervalue < 100
document.write(‘Your delivery is free as your order value is’ + ‘£’ + ordervalue + ‘.<BR>’);
else
document.write (‘You will receive a free gift and delivery is free as your order value is’ + ‘£’ + ordervalue + ‘.<BR>’);
}
</script>
</body>
</html>