Question: This C++ program will calculate the rise in ocean levels over 5, 10, and 50 years. Code using C++. Part of the program has been
This C++ program will calculate the rise in ocean levels over 5, 10, and 50 years. Code using C++.
Part of the program has been written for you. The part that has been written will read in a rise in ocean levels (per year) in millimeters. This value is read into a variable of type double named risingLevel. You will be completing the program as follows:
Output the value in risingLevel. This should be the first line of output. The output should be as follows (assume risingLevel has a value of 2.1).
Level: 2.1
The number of millimeters higher than the current level that the ocean's level will be in 5 years (assuming the ocean is rising at the rate of risingLevel per year). This is your second line of output. The output will be as follows:
Years: 5, Rise: 10.5
The number of millimeters higher than the current level that the ocean's level will be in 10 years (assuming the ocean is rising at the rate of risingLevel per year). This is your third line of output. The output will be as follows (for a ``risingLevel``` of 2.1).
Years: 10, Rise: 21
The number of millimeters higher than the current level that the ocean's level will be in 50 years (assuming the ocean is rising at the rate of risingLevel per year). This is your final line of output.The output will be as follows (for a ``risingLevel``` of 2.1).
Years: 50, Rise: 105
For each of the above you need to output the number of years and the total rise in ocean levels for those years. This is all based on the value in risingLevel.
For example:
A risingLevel of 2.1 for 5 years would have the following output:
Level: 2.1 Years: 5, Rise: 10.5 Years: 10, Rise: 21 Years: 50, Rise: 105
Your output must have the same syntax and spacing as above.
Finally, do not include a system("pause"); statement in your program. This will cause your verification steps to fail. You will not be allowed to use the system("pause"); statement in any of the lab lessons for all lessons in CS 1136. This will not be repeated in future labs but it will apply to all future labs.

LAB ACTIVTY 2.24.1: Lab Lesson 2 (Part 2 of 3) 0/25 lesson2part2.cpp Load default template... 1 // Calculate rising ocean levels based on the estimated rate of rising (in millimeters). This 2/ estimated value is read from cin into variable risingLevel 5 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
