Any 5 from:
– input length, breadth, height and weight
– check each dimension, not more than 80
– check total of dimensions, not more than 200
– check weight at least 1
– check weight not more than 10
– output parcel accepted (must be in appropriate position)
– output parcel rejected (must be in appropriate position)
– output all reasons for rejecting parcel (reason must follow test)
Max 5 marks
Sample Answer.
INPUT Length, Breadth, Height, Weight
IF Length <= 80 AND Breadth <= 80 AND Height <= 80 AND Weight >= 1
AND Weight <=10 AND Length + Breadth + Height <= 200 THEN
PRINT 'Parcel accepted'
ELSE
PRINT 'Parcel rejected'
IF Length > 80 OR Breadth > 80 OR Height > 80 THEN
PRINT 'At least one dimension too large'
ENDIF
IF Weight < 1 THEN
PRINT 'Parcel too light'
ENDIF
IF Weight > 10 THEN
PRINT 'Parcel too heavy'
ENDIF
ENDIF