i have double type lets say it called "a" ,
when i do some calculation like a=10/4;
and printout the variable its print the number 2 and not 2.5
when i declare a=2.5 its print out 2.5 .
im using visual studio 2010 pro , platform Win32 .
10/4 is an integer division, thus it result will be an integer
you need to make one of the operands a double to get a double as result
eg: 10./4 the dot makes it a double, you can also write 10.0/4 or do the same to 4