Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN C++ write recursive programs only and also use the function stated in the problem if possible. WRITING THE DIGITS OF AN INTEGER BACKWARDS Write
IN C++
write recursive programs only and also use the function stated in the problem if possible.
WRITING THE DIGITS OF AN INTEGER BACKWARDS Write and implement a C++ function backwards (n) that writes the digits of its positive integer argument in reverse order. For example, if the value of n is 234567, the function writes the digits 7 6 5 4 32. EXPONENTIATION Write and exercise a recursive function exp(x,n) that returns the value of the double x raised to the non-negative integer power n. A run of a program that exercises this function might look like this: Enter a real value: 2.4 Enter an integer: 3 2.4^3 = 13.824 Remember that any non-zero value raised to the power 0 is 1. DETERMINING IF AN INPUT STRING IS A PALINDROME A palindrome is a string in which the letters are the same in both directions, disregarding capitalization and non-letter characters. For example, "Able was I ere I saw Elba." is a palindrome. Write a program that reads a string of characters and calls a recursive function to determine if the letters in the string form a palindrome. Several runs of the program might look like this: csh> pal Enter a line that might be a palindrome. -> Madam I'm Adam. The string Is a palindrome. csh> pal Enter a line that might be a palindrome. -> Go hang a salami, I'm a lasagna hog. The string Is a palindrome. csh> pal Enter a line that might be a palindrome. -> This is another candidate string. The string is NOT a palindromeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started