Just check it I am giving a fair idea
Its possible only for whole numbers ...
int n=0,div=0;
if(n==27) /*assuming 27 is the number i am going to divide */
{
printf("The value of 27/3 is %d",div);
}
else
{
div=div+1;
n=n+3;
}
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Paul Herring
Sent: Thursday, February 01, 2007 6:32 PM
To: [email protected]
Subject: Re: [c-prog]
On 2/1/07, Parul Puri <[EMAIL PROTECTED]> wrote:
shift operator divides by 2 but i want it to divide by 3
Well divide by 2, then add onto that the original number divided by 4
then.
On 2/1/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
use shift operators
________________________________
From: [email protected]
[mailto:[email protected] ] On Behalf Of Parul Puri
Sent: Thursday, February 01, 2007 5:39 PM
To: [email protected]
Subject: [c-prog]
how to divide a number by 3 without using * / %
--
PJH
#706281 +(1868)- [X]
TriPod11: bush ain't THAT bad...he kinda knows what he's doin
idaredbeet08: Please, Monica Lewenski had more President in her than
George Bush ever will.