in C++ please 1. Write a recursive function called sumover that has one argument n, which is an unsigned integer. The function returns a double value, which is the sum of the reciprocals of the first n positive integers. (The reciprocal of x is the fraction 1/ x .) For example, sumover(1) returns 1.0 (which is 1/1); sumover(2) returns 1.5 (which is 1/1 + 1/2); sumover(3) returns approximately 1.833 (which is 1/1 + 1/2 + 1/3). Define sumover(0) to be zero. Do not use any local vari- ables in your function. Submit output for when n=290

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
in C++ please
1. Write a recursive function called
sumover
that has one argument
n,
which is an
unsigned integer. The function returns a
double value, which is the sum of the reciprocals of
the first
n
positive integers. (The reciprocal of
x
is
the fraction 1/
x
.) For example,
sumover(1)
returns
1.0
(which is 1/1);
sumover(2)
returns
1.5
(which
is 1/1 + 1/2);
sumover(3)
returns approximately
1.833
(which is 1/1 + 1/2 + 1/3). Define
sumover(0)
to be zero. Do not use any local vari-
ables in your function.
Submit output for when n=290
 
2. isPal funciton
Implement the recursive function isPal(), which determines whether a string str is
a simple palindrome. A simple palindrome is a string consisting entirely of the
characters a-z that reads the same forward and backward. For instance, the
upcoming are palindromes: dad, level, mom, madamimadam,
gohangasalamiimalasagnahog.
Use the following declaration of isPal():
bool isPal (const string& str, int startIndex, int
endIndex);
It returns true when the substring in the index range [startIndex, endIndex) is a
palindrome. The conditions are
Stopping Condition:
Result is true when startIndex >= endIndex -1
Result is fales when str[startIndex] != str[endIndex-1]
Recursive Step:
Determine whether the substring of the str in the index range [startIndex+1,
endIndex-1] is a palindrome. 
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Fibonacci algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr