The point of the program here is to convert a list of temperatures Fahrenheit to Celsius, then at the end give the average of both Fahrenheit and Celsius.
The issue i am running into is calculating the average at the end. I am supposed to use a sentinel to signal that i am done entering data.
Well first off, I wouldn't use a post-test for this. If I enter your sentinel value right off the bat, it's still gonna get processed.
I don't really agree with your sentinel value, but it'll work for all temperatures on this planet.
Or this is popular notation that does the same thing:
farhsum += farh;
centsum += cent;
You are also going to run into the problem with when you do input -99 it is going to convert that and calculate that as part of your average. That is what ResidentBiscuit meant by a post-test. I assume you don't want to do that.
Thanks for your help its much appreciated. I have the averages working, but like you said the sentinel is not working properly, and getting calculated into the total.
I tried following some tutorials online about sentinels, but could not figure out what i am doing wrong here.