A positive floating point number is specified. Determine whether among the first three digits of the fractional part of the digit 0.

Closed due to the fact that off-topic participants Harry , Vladimir Martyanov , Grundy , Pavel Mayorov , Alex 30 Nov '16 at 7:45 .

  • Most likely, this question does not correspond to the subject of Stack Overflow in Russian, according to the rules described in the certificate .
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • eight
    Homework is not done here ... - Harry
  • OK, write the code, resolve it :) - PinkTux
  • one
    Homework assignments are designed to develop your knowledge. In order for you to be helped, you need to show how you yourself tried to solve the problem and / or that you are not working / do not understand. - Alex
  • I want to answer this question)) - ampawd

1 answer 1

Hmm .. Excess too much ... But it should work, probably.
In addition, it is rectangular :)

res = 'bool check(double x)\n{ x%=1; return //'; for (var a=0; a<10; ++a) for (var b=0; b<10; ++b) for (var c=0; c<10; ++c) if (!a || !b || !c) res += ' ||\nx>=.'+a+b+c + ' && x<.'+(a+!a)+!!a*(b+!b)+!!a*!!b*(c+!c); res += ' ;}'; document.body.textContent = res; 
 body { white-space: pre; font-family: monospace; }