C++ Program          Write a CPP program to do the following using recursion: 1. Using the current estimated population of 7.7 Billion and an estimated growth rate of 1.06%,  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.0106  to increase by 1.06%. 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   cout << setprecision(11);  // done once   DO NOT USE GLOBAL VARIABLES, STATIC VARIABLES OR LOOP CONSTUCTS. DO NOT USE REDUCED NUMBERS - DO NOT USE 7.7 or 20 TO REPRESENT 7.7 BILLION AND 20 BILLION Deliverable is a working CPP program and pseudocode. NOTE: If you run into a stack overflow when running this program, please see the above class note regarding this issue. 7.7 Billion = 7700000000 20 Billion = 20000000000

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++ Program 

        Write a CPP program to do the following using recursion:

1. Using the current estimated population of 7.7 Billion and an estimated growth rate of 1.06%,  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.0106  to increase by 1.06%. 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 << setprecision(11);  // done once

 

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

DO NOT USE REDUCED NUMBERS - DO NOT USE 7.7 or 20 TO REPRESENT 7.7 BILLION AND 20 BILLION

Deliverable is a working CPP program and pseudocode.

NOTE: If you run into a stack overflow when running this program, please see the above class note regarding this issue.

7.7 Billion = 7700000000

20 Billion = 20000000000

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY