I write the following code, but I have a problem. When I divide 1 by 1059255, the result will be zero, because the result of division is close to zero and it's getting rounded.
for(x = 2 ; x <= 1059255; x++)
{
y += (1/1059255) * x;
}
What changes needed to get the correct result?