Search code examples
basic

Visual Basic Output


This is for a task I'm doing at the university. The following code is provided. Code and the data given.

The question is what will be returned for the given data set and my answer was, False 5 times. I've been asked by my tutor to recheck that answer and I'm not sure what I'm doing wrong. Any insight would be appreciated.


Solution

  • The function checks 5 values in the FOR loop, but never returns to the caller. After that the FOR loop has ended, the function returns with return value of "FALSE"