I was working on this code in C language and was unable to understand the reason for getting different answer for these two codes.
first writing values without decimal point
float num2=(5/9);
this gave me the output as the following:
0.000000
with decimal point
float num2=(5.0/9.0);
this gave me the output as the following:
0.555556
what is the working or theory behind this difference of answers?