Problem
General requirements:
• No global variables
• No multiple return statements in one function
• Show how you have tested these functions
• You can use cin and cout in this function but please do not print out the results.
• It should return the values to the caller through the use of return type & pass-by-reference parameters.
• Do not use struct, tuple or pair class.
• Use only pass-by-reference parameters and return type to return values to the caller.
• Do not use arrays. Please use only simple variables to keep track of the information.
Note: this is an exercise to use functions and not array.
Task
Write function named "countBetween" that reads in from the user a list of numbers until the user re-enters the first number. It will return the count of how many numbers between the first numbers. In addition, it returns a boolean flag that indicates whether the numbers in between are all more or less than the first number but not both.
For example, if the user enters 10, 10, it will return 0 and false.
If the user enters 10, 30, 40, 10 it will return 2 and true (all numbers are more than the first number)
If the user enters 10, 20, 30, 5, 10, it will return 3 and false.
If the user enters 50, 10, 40, 30, 50, it will return 3 and true (all numbers are less than the first number)
If the user enters 0, 10, 0, it will return 1 and true.