Question: Was wondering on how to write this using C++, and all of the parameters given and not using global varibales. Goals: Practicing loops Problem: Complete

Was wondering on how to write this using C++, and all of the parameters given and not using global varibales.
Goals: Practicing loops Problem: Complete Programming Challenges 3 (Ocean Levels) from Chapter 5 in your text book with the following modifications. Ask the user to input a city at which the ocean level will be measured (the city name may contain spaces). Prompt the user to enter the current level (in meters) at that city (include the city name) and robustly confirm that level is at least 1 meter using a while loop. Remember to prompt the user to re-enter if the input is invalid and store the new number. . . .Output a heading for a table containing the "Year" "Level Increase (mm)", and "current . Use a for loop to output a table containing, the year, the increase in water level, current level (meters)" water level for that city. Use formatting concepts to align the columns. The first line should have 2018 for the year, 0 for the level increase and the user's input for the current level. Below are example of some output for the first 3 years with what the user entered in bold. Note the significant digits of the output. The final year should be 2043. Enter the name of the city. Big Springs What is the current ocean level at Big Springa in meters? 3.7623 Level Increase (mm)Current Level (meters) Year 2018 2019 2020 0.0 1.5 3.0 3.7623 3.7638 3.7653
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
