In my printf, I need to use %f but I\'m not sure how to truncate to 2 decimal places:
printf
%f
Example: getting
3.14159
as described in Formatter class, you need to declare precision. %.2f in your case.
%.2f