If this is exactly from the book then the book has a typo (or two).

These lines don't do anything:


factor - 212 - 32;
fahrenheit - factor * celsius/100 + 32;


Maybe you mean