Write a VB.Net program to check if a system has a sequence of five consecutive integers within its list of 150 recorded sensor readings.
When writing your program you should assume:
pressures that contains the 150 integer sensor readingspressures(0) contains the first value and pressures(149) contains the last valuepressures are already stored in ascending numerical orderrunDetected that has an initial value of False.Your program should set runDetected to True if there is a valid run of five consecutive integers (for example: 102,103,104,105,106102, 103, 104, 105, 106102,103,104,105,106).
You should use meaningful variable name(s) and VB.Net syntax in your answer.
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.