Skip to content
MathsGenie logo
Open app

Course home

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

Programming concepts

EasyMediumHard
1234567891011121314151617181920212223
Question 16

A retail store is writing a program to calculate a customer's promotional bonus points across three separate purchases.

If any purchased items are subsequently returned, the customer's total bonus points are reduced.

Write a VB.NET program to calculate the final total bonus points.

You should assume there are three integer variables called p1, p2, and p3 which have already been declared and given values representing the points from each of the three purchases.

The program should:

  • Get the user to enter the number of returned items and store this number in a variable
  • Calculate the total bonus points for the three purchases
    • If exactly one item was returned, the total bonus points are reduced by 25
    • If more than one item was returned, the total bonus points should be halved
    • The total bonus points must not be less than 0
  • Return/output the final calculated total bonus points

You should use meaningful variable name(s) and VB.NET syntax in your answer.

[7]

Programming concepts Questions

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