Double Precision in CPP?

Правка en1, от hungrytired, 2020-07-13 08:10:56

I was trying out this question on AtCoder, https://atcoder.jp/contests/abc169/tasks/abc169_c. Actually in cpp i was doing double a = 9.79 and then long long b = 9.79*100 and weird thing b was assigned 978 not 979. I am confused why is this happening. If someone can put a blog link which might explain the problem further. Thanks a lot.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hungrytired 2020-07-13 08:10:56 360 Initial revision (published)