You control the number of digits by using the format specifications in the printf statement. See
Format Specification Syntax: printf and wprintf Functions | Microsoft Docs[
^].
So for two digit precision you use
%.2f
. To print the Celsius as an integer, you need to cast the value to an integer and use the
%d
specification.
printf("Celsius: %d\n", (int)Celsius);