Write a C# program to check if a logistics shipment contains a valid consecutive sequence of six packages within a delivery batch of 150 packages.
When writing your program you should assume:
batchIDs that contains the integer IDs of the 150 packagesbatchIDs[0] contains the ID of the first package and batchIDs[149] contains the ID of the last packagebatchIDs are stored in ascending numerical orderisValidSequence that has an initial value of falseYour program should set isValidSequence to true if there is a valid consecutive sequence of six packages (where each adjacent ID increases by exactly 1).
You should use meaningful variable name(s) and C# syntax in your answer.
Sequence Examples:
..., 12, 13, 14, 15, 16, 17, ......, 10, 11, 15, 16, 17, 18, ......, 30, 31, 31, 32, 33, 34, ...
(The duplicate ID 31 breaks the continuous progression of six unique adjacent elements)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.