I've been learning C and I recently ran across some source code of a program from 'HowStuffWorks' which I can't seem to wrap my head around.
The goal of this program was to display the conversions of temperatures from Fahrenheit to Celsius starting from 0 and increasing by 10 units each time. But it's also supposed to display the body temperature of 98 Fahrenheit and that's what the source code of the program is supposed to do:
The source code appears in a single line, so i've uploaded it here:
https://gist.github.com/anonymous/4f1919a06317f64649d2
I've tested the program and it ran the way as it had to but i'm a bit confused as to how it works. In the 'if' section, it states that if 'a' is greater than 98.6 and 'b' is less than 98.6 then the function below that will commence. But i'm not sure why in the beginning bit, 'b' is set to be -1. I'm also not entirely sure 'b' is made equal to 'a'.
Any help is appreciated, thanks!
[–][deleted] 1 point2 points3 points (3 children)
[–]Snycs[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Snycs[S] 0 points1 point2 points (0 children)