Write a complete C++ program that prints the change in population of the the United States: p = p + Bp - Dp where p is the population, B is the birth rate of 12.4 births for every 1000 people (12.4/1000) each year, and D is the death rate of 8.4 for every 1000 people (8.4/1000). In 2017, the population of United States was 325.7 million. Your program should ask the user for the number of years and print expected population over those years starting from 2017. Each line should have: the year and the population (in millions). A sample run: Please enter the number of years: 10 Zear 2017 325.70 Zear 2018 327.00 lear 2019 328.31 lear 2020 329.62 lear 2021 Zear 2022 Zear 2023 lear 2024 Kear 2025 ear 2026 330.94 332.27 333.60 334.93 336.27 337.61

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question
Write a complete C++ program that prints the change in population of the the United States:
p = p + Bp
Dp
where p is the population, B is the birth rate of 12.4 births for every 1000 people (12.4/1000) each year, and D is the death rate of 8.4 for every 1000 people (8.4/1000). In 2017, the
population of United States was 325.7 million. Your program should ask the user for the number of years and print expected population over those years starting from 2017. Each line
should have: the year and the population (in millions).
A sample run:
Please enter the number of years: 10
Year 2017
325.70
Year 2018
327.00
Year 2019
328.31
Year 2020
329.62
Year 2021
330.94
Year 2022
332.27
Year 2023
333.60
Year 2024
334.93
Year 2025
336.27
Year 2026
337.61
Transcribed Image Text:Write a complete C++ program that prints the change in population of the the United States: p = p + Bp Dp where p is the population, B is the birth rate of 12.4 births for every 1000 people (12.4/1000) each year, and D is the death rate of 8.4 for every 1000 people (8.4/1000). In 2017, the population of United States was 325.7 million. Your program should ask the user for the number of years and print expected population over those years starting from 2017. Each line should have: the year and the population (in millions). A sample run: Please enter the number of years: 10 Year 2017 325.70 Year 2018 327.00 Year 2019 328.31 Year 2020 329.62 Year 2021 330.94 Year 2022 332.27 Year 2023 333.60 Year 2024 334.93 Year 2025 336.27 Year 2026 337.61
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Bare Bones Programming Language
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr