Skip to content
MathsGenie logo
Open app

Course home

  1. GCSE
  2. Computer Science AQA
  3. Question bank

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223
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]

Programming concepts Questions

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