20. Getting integral and fractional parts from a double You know, there are some problems which are very easy if…