Reduce scope of scale factor.
Add tests to leave variables not unused. Cppcheck will be happy :-)
Comment unused variables.
Reduce scope of variables
Remove unused variable.
Comment unused variables.
Make scanf() test overflow save by adding a number to %s format.