Dim tooWide, tooHigh, tooDeep, wrongWeight, parcelRejected, wrongDimensions As Boolean
Dim width, height, depth, weight, totalDimensions As Single
Dim count, noOfParcels, noAccepted, noRejected As Integer
Dim totalWeight As Single
Console.Write("How many parcels in the consignment: ")
noOfParcels = Console.ReadLine()
For count = 1 To noOfParcels
Console.Write("Enter the height of the parcel: ")
height = Console.ReadLine
Console.WriteLine("The parcel is not within the height limit")
Console.WriteLine("The parcel is within the height limit")
Console.Write("Enter the width of the parcel: ")
Console.WriteLine("The parcel is not within the width limit")
Console.WriteLine("The parcel is within the width limit")
Console.Write("Enter the depth of the parcel: ")
Console.WriteLine("The parcel is not within the depth limit")
Console.WriteLine("The parcel is within the depth limit")
totalDimensions = height + width + depth
If totalDimensions > 200 Then
Console.WriteLine("The sum of the dimensions is not within the limit")
Console.WriteLine("The sum of the dimensions is within the limit")
Console.Write("Enter the weight of the parcel: ")
weight = Console.ReadLine
If weight < 1 Or weight > 10 Then
Console.WriteLine("The parcel is not within the weight limit")
Console.WriteLine("The parcel is within the weight limit")
If parcelRejected = True Then
noRejected = noRejected + 1
Console.WriteLine("The parcel was rejected. This was because: ")
Console.WriteLine("- The parcel was not within the width limit")
Console.WriteLine("- The parcel was not within the height limit")
Console.WriteLine("- The parcel was not within the depth limit")
If wrongDimensions = True Then
Console.WriteLine("- The sum of the dimensions was not within the limit")
If wrongWeight = True Then
Console.WriteLine("- The parcel was not within the weight limit")
noAccepted = noAccepted + 1
totalWeight = totalWeight + weight
Console.WriteLine("The parcel was accepted")
Console.WriteLine(noAccepted & " parcel(s) accepted")
Console.WriteLine("Total weight: " & totalWeight & "kg")
Console.WriteLine(noRejected & " parcel(s) rejected")