Need Help on Recursion.

Hello everyone, I am new on the pascal, I really needs help to write
recursive subroutines. can you helps me to do it? thank you very much.

Shin Wong


Write a recursive function with three parameters: str (of type
chararray), left, and right. The function should check whether the
portion of the string str from position left through position right is a
palindrome, returning true if it is a palindrome or false if it is not a
palindrome. A palindrome is a string which same whether you read from
left to right or right to left; for example, the strings 'racecar' and
'xyzzyx' are palindromes, but the strings 'abcd', 'sales', and 'xyxy'
are not palindromes.

Problem 2:

Write a recursive procedure that will search a string str for the
character ch1, replacing all occurrences of ch1 with the character ch2.
Use a fourth parameter named numchars for passing in the length of the

Problem 3:

Write  a recursive function that uses the "divide-and-conquer' technique
to compute the sum of the elements in an array of integers (a parameter
A of type intarray) from positions left through right, inclusive. As an
example, if the procedure were called with the array {5, 6, 1, 2, 8, 3}
and the positions 2 and 6, then the function should return the value 20.