Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 239

Comment by Peter - Reinstate Monica on Why am I getting an int as an answer when I clearly defined it to be a double/float?

$
0
0
As an aside, the sequence of events you report contains the explanation: You already know the (undesired truncated integer) result of val1/val2 because you started by printing that directly. Assigning it to a variable, floating point or not, will not change that result ;-).

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>