i'm completly clueless, and i need to have this done by wednesday next week (ya it's an assignement) i want to learn how to do this, because it surely wont be the last lab this semester,
A program is needed to create a linear model using the least-squares technique presented in class for the following temperature measurements obtained by the weather balloon in the stratosphere:
Altitude Temperature
(km) (oC)
20 -50
30 -40
40 -20
50 -2
Over this region of the atmosphere, these data are nearly linear, and thus we can use a linear model to estimate the temperature at altitudes other than ones for which we have specific data. Use two one-dimensional arrays to store the data shown above (hard-coded). Your program must compute the linear model from these data points, print the model to the screen with the beginning and ending altitudes to indicate the region over which the model is valid. In a loop, your program must then prompt the user for an altitude and compute and print to the screen the temperature at the desired altitude. Your program must validate the user’s entry with respect to the range of validity of the model. Looping and your program ends when the user enters a negative value for the altitude.
After what i can see, i need to calculate the best ajusted line for the information given
i have a formula that i can put in the program,
after wards, the user can input an information (altitude) and the program will give him the temperature
WHERE DO I START AND explain arrays to me please