Create PrintSubstring

Prints the beginning and ending index of the substring of an array whose sum is equal to the entered value.