I am a university student. When learning C language, I encountered the problem of floating point division. Can anyone help me to see why the results are different every time I run it. thank you very much.( I am running in a Linux)
My English is not good, hope you can understand the meaning of my question。
#include <stdio.h>
int main()
{
double a = 1;
double b = 2;
printf("%d\n",b/a);
return 0;
}