Question: Java How urgent is the global warming issue? The urgency depends on quickly exceed safe levels of carbon dioxide (CO2) in the atmosphere. Around 1850,


Java
How urgent is the global warming issue? The urgency depends on quickly exceed safe levels of carbon dioxide (CO2) in the atmosphere. Around 1850, the levels of CO2 in the atmosphere was 280 ppm (parts per million). Since the industrial revolution, CO2 levels have increased. By 2013, the levels of CO2 had increased to around 400ppm. Along with these elevated CO2 levels, we have also seen the average global temperature increase above pre-industrial levels by 0.85C. Some climate scientists' models predicted that we could possibly stabilize the average global temperature (at a 2C increase over the pre-industrial period) if we are able to keep our carbon dioxide concentrations below 450ppm.[1] In this problem, you will read in a list of integer CO2 readings in ppm) followed by a negative integer that marks the end of the data set. From this list of CO2 values, you will determine the maximum value reached. You will then output the maximum CO2 level encountered. If that value is 450ppm or greater, you will also output a warning. Write the body of the program. Function Details Input The program reads in a list of positive integers, representing the carbon dioxide (CO2) levels in ppm, followed by one negative integer. Processing Determine the maximum CO2 level reached. Determine whether this maximum level reaches a high-risk value of 450ppm or greater. Output Output "Max: " followed by the maximum CO2 level reached, including units (ppm). If this maximum level reaches a high-risk level, output "Warning - high risk" on a new line. The text must be terminated by a new-line character. Sample input/output: Sample Input Sample Output 120 230 -1 Max: 230ppm Max: 473ppm 430 441 473 -23 Warning - high risk 345 234 376 -5 : 376ppm Max: 462ppm 370 383 462 -17 Warning - high risk
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
