Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
Question 18

Write a VB.Net program that calculates the delivery charge for a customer's online order based on the total order value and the delivery distance.

The program should:

  • Prompt the user to input the total order value (in pounds, e.g. 52.50).
  • Prompt the user to input the delivery distance (as a whole number of miles).
  • Calculate and output the delivery charge based on these criteria:
    • If the distance is less than or equal to 5 miles and the order value is greater than 50, then the delivery charge is 0.
    • If the distance is greater than 5 miles, then the delivery charge is the distance multiplied by 1.2 plus a flat rate of 4.
    • Otherwise, the delivery charge is 3.50.

You should use meaningful variable names and correct VB.Net syntax in your answer.

[7]
Markscheme

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank