Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Functions [6/9]

The user-defined function IsBetween returns the value true when the value of parameter x is between values of parameters a and b.

The type of return value of function IsBetween is bool. Therefore, this function can only return values true or false.

The first call of function IsBetween returns true because 4 is between 2 and 9.

The second call of function IsBetween returns true because 5 is between 1 and 8.

The third call of function IsBetween returns false because 10 is not between 1 and 8.

Loading...