That is compiler-dependent. (Python is fun, I know )
Type conversion operators are the sure way to go.
Edit:
As an excercise, do the following:
float a = 3.76, b = 2.32;
int c
Try to output:
1. a mod b
2. a/b
3. a - converted to int / b and the result converted to int
4. attribute c the values of a + b, then print c as if it were a float so that in our case a+b == c
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.