- This is a solution to the second challenge.
It may seem a little bit simpler than the first one,
however, it's very useful.
In computer science and computer programming,
often you will find out that the best solution
to a challenge or a problem, is typically simple.
You don't necessarily need to require a lot of
complicated computer science algorithms, so here it is.
We know that the boiling Celsius and freezing Celsius
temperatures are given at 100 and zero respectively
in line 15 and 16,
and we're introducing here a
slightly new concept called constant.
In line 19, we're going to calculate the boiling temperature
in Fahrenheit by taking the boiling temperature in Celsius
times nine over five plus 32.
We are going to then repeat the calculation for freezing
and then we'll use the formula for boiling and freezing
in Kelvin by simply adding 273.
This exercise was not only meant to demonstrate
how difficult or easy it is to solve a problem using C,
but the ability to take a problem, define in plain English,
and the set of formulas that held this solution,
and translate that precisely into computer language.
This is a very important skill to have as
a computer programmer.
If you are able to translate accurately the requirements
of a problem into a computer language, you have already
accomplished a major step towards solving it.