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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education