H
Hatzigiannakis Nikos
In the following code
main()
{
double x;
for (x=0.0;x<=1;x=x+0.05)
{
printf("x=%6.3f \n",x);
}
}
I receive numbers from 0 to 0.950. 1 is not included. I understand that it
is an accuracy problem but how can I solve it ?
main()
{
double x;
for (x=0.0;x<=1;x=x+0.05)
{
printf("x=%6.3f \n",x);
}
}
I receive numbers from 0 to 0.950. 1 is not included. I understand that it
is an accuracy problem but how can I solve it ?