I see that for the following code produces the result as below, any idea on why is the output like this?
#include #include in
Use the round() function before casting to int, else the trailing digits will just get truncated.
round()
int