Purchase Solution

Creating C++ Program Functions: Recursive Functions

Not what you're looking for?

Ask Custom Question

(1) Write a recursive function to generate a patter such as the following pattern:

*
**
***
****
****
***
**
*

The program should prompt the user to enter the number of lines in the pattern. Enter 4 should generate the above pattern.

(2) Write a recursive function to generate a patter such as the following pattern:

*
* *
* * *
* * * *
* * *
* *
*

The program should prompt the user to enter the number of lines in the pattern. Enter 4 should generate the above pattern.

(3) A palindrome is a string that reads the same both forward and backward. Write a program that uses a recursive function to check whether a string is a palindrom or not. Your program must contain a value returning recursive function that return true if the string is a palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.

Purchase this Solution

Solution Summary

Provides steps necessary to create the C++ programs.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.