Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

C Plus Plus Recursion Current World Population Program

C Plus Plus Recursion Current World Population Program

C Plus Plus Recursion Current World Population Program

Description

   Write a CPP program to do the following using recursion: (refer to the textbook chapter 19 in the attachment)

Current World Population 

1. Using the current estimated population of 8 Billion and an estimated growth rate of 1.05%,  compute the estimated year when the population year could exceed over 20 Billion.

2. Display the year (2xxx) and estimated population values for each year as you do this processing.

3. Start with the current year and display the data in ascending order.  I am specifying this as it is possible to report this in descending order if the display is done after the recursion.

For this assignment, create a method that calls itself recursively, passing the year and current population to itself.  You can increase the population by applying  * 1.0105  to increase by 1.05%. This method can return void and thus should do all the displays and computations needed. Display the year processed and estimated population value..

The variable for the population should be a double data type. Do not allow the display to be in scientific notation.  The following can help with that issue:

#include<iomanip>  

cout << fixed << setprecision(11);  // done once

DO NOT USE GLOBAL VARIABLES, STATIC VARIABLES OR LOOP CONSTRUCTS.

DO NOT USE REDUCED NUMBERS – (13.98 or 20)

Unformatted Attachment Preview

CHAPTER
19 Recursion
TOPICS
19.1
19.2
19.3
19.4
19.5
19.1
Introduction to Recursion
Solving Problems with Recursion
Focus on Problem Solving and
Program Design: The Recursive
gcd Function
Focus on Problem Solving and
Program Design: Solving Recursively
Defined Problems
Focus on Problem Solving and
Program Design: Recursive Linked
List Operations
19.6
Focus on Problem Solving and
Program Design: A Recursive
Binary Search Function
19.7 The Towers of Hanoi
19.8 Focus on Problem Solving
and Program Design:
The QuickSort Algorithm
19.9 Exhaustive Algorithms
19.10 Focus on Software Engineering:
Recursion vs. Iteration
Introduction to Recursion
CONCEPT: A recursive function is one that calls itself.
You have seen instances of functions calling other functions. Function A can call function
B, which can then call function C. Itàalso possible for a function to call itself. A function
that calls itself is a recursive function. Look at this message function:
void message()
{
cout 0)
{
cout 0
{
cout 0)
{
cout
Purchase answer to see full
attachment
Explanation & Answer:

1 program

User generated content is uploaded by users for the purposes of learning and should be used following our honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20