1. ## Help with array

I need help using an array to do relation between elevation and temperature.  2. What exactly is the help that you have in mind? 3. can you give me an example program of how to use an array for this type of problem? Having a slope and how to pick numbers off of it when the user asks for it? 4. Suppose we had a table mapping student assignment grade cutoffs to the grade letters, and given the student's assignment grade as a numeric value, we wanted to find out what the grade letter for the assignment should be. We might come up with an algorithm like this:
Code:
```grade_cutoffs = {90, 70, 50, 0}
grade_letters = {'A', 'B', 'C', 'F'}
i = 0
loop while i < number of grade_cutoffs
break
increment i```
So, if the student scored 60 points as the grade, the algorithm will loop until i = 2, upon which 60 > 50, so grade_letter will be 'C'.

EDIT:
Actually, this is not a terribly good example because you're dealing with a slope and need to use linear interpolation as described in the instructions. But ehh... what have you tried? I came up with this as it looked like you didn't even know how to use arrays to get corresponding values, and if indeed you don't, you should attempt this first. 5. I might be misinterpreting what you're saying, but I think you need to realize that the slopes aren't read from the table; you're using the numbers from the table in the formula at the top of your snippet.

I would suggest making sure you know how to get the five sample outputs from the five sample inputs; if you can do that, then I would think you would be a long way toward writing it out in C. Popular pages Recent additions array, confused, elevation, relation, temperature 