Hi.

I was reading a magzine.

It had this question

Without using /,% and * operators. write a function to divide a number by 3.

Can anyone help...

Printable View

- 05-16-2007Ajay Bahadurarithmatic operations without using them..
Hi.

I was reading a magzine.

It had this question

Without using /,% and * operators. write a function to divide a number by 3.

Can anyone help... - 05-16-2007grumpy
Strikes me as a homework problem. Ever heard of logarithms?

- 05-16-2007ulillillia
Division is really repeated subtraction. Just take a base number, such as 8152 and subtract 3 from it, but add 1 to the count. When the number to subtract is less than the amount to be subtracted, stop. You have the answer and the remainder, if any. Just adding and subtracting is used.

- 05-16-2007Salem
- 05-16-2007laserlight
Threads merged with duplicate deleted.

- 05-16-2007robatino
Looks like an Adobe test from last year.

http://www.google.com/search?q=%22wr...hl=en&filter=0 - 05-16-2007Ajay BahadurThanks....
THanks

- 05-16-2007Ajay BahadurYes...it is from Adobe test paper...
- 05-16-2007QuestionC