Some Background
Hopefully you remember that a linear model is created by specifying a slope and an intercept
where you can use the equation y = slope * x + intercept (y is the temp, x is the year). I gathered
(see spreadsheet) the average global temp in degrees Fahrenheit, 1880-2012, and fit a linear
model to it. The slope is 0.01173 degreesF/year and the intercept is 34.3491 degreesF. Using this
information, you will write a program that does as follows.
Program Specifications
Your program will do the following:
1. Take as input two values:
a. a year, as a long
b. a slope, as a double
2. Print three results:
a. Print the temperature for the year read in above based on the slope and intercept
provided in the Background section. Print it as a double of precision 2.
b. Print the year when, given the temperature calculated in a. above, a temperature 7
degrees greater will occur again using the slope and intercept provided in the
Background. Print it as a rounded long.
c. Print the year when, given the temperature calculated in a. above, a temperature 7
degrees greater will occur using the second input, a new input slope, and the
intercept provided in the Background. Print it as a rounded long.