Re: division by 7 without using division operator



On 1 fév, 05:03, krypto.wiz...@xxxxxxxxx wrote:
Last month I appeared for an interview with EA sports and they asked
me this question.

How would you divide a number by 7 without using division operator ?

To suceed in these interviews, I fear that you must not be so smart as
to outsmart the person asking the questions. So I suspect the right
answer might have been

number *= 0.142857142857143; // divide by 7

which indeed, in quite a few contexts, is an approriate answer.

Francois Grieu

.