oops! yes I was trying to find whether that number is negative or positive
by shifting the highest bit to oth location...
that is a typo error..

Thanks for pointing out!

On Wed, Aug 24, 2011 at 7:32 PM, vikas singh <[email protected]> wrote:

>
>
> On Tue, Aug 23, 2011 at 7:50 PM, *$* <[email protected]> wrote:
>
>> int a,b;
>> int c=a-b;
>> c=c<<31;
>>
>
> c=c>>31;   // hope you're trying for this. ;)
>
>
>> int x =c&0x01;
>> a=a-x*c;
>>
>> Thx,
>> --Gopi
>>
>>
>> On Tue, Aug 23, 2011 at 7:32 PM, Sanjay Rajpal <[email protected]> wrote:
>>
>>> @teja : use of comparison operator is not allowed.
>>> Sanju
>>> :)
>>>
>>>
>>>
>>> On Tue, Aug 23, 2011 at 6:42 AM, teja bala <[email protected]>wrote:
>>>
>>>> int a,b,c;
>>>> c=(a<b)?a:b;
>>>> print(c);
>>>>
>>>>  On Tue, Aug 23, 2011 at 6:37 PM, Abhishek Yadav <
>>>> [email protected]> wrote:
>>>>
>>>>> Write a method which finds the maximum of two numbers  You should not
>>>>> use if-else
>>>>> or any other comparison operator.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>>
>>>>   --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Thx,
>> --Gopi
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thanks and Regards
> VIKAS SINGH
> MCA- final year
> NIT DURGAPUR
> email:
>  [email protected]
>  [email protected]
> http://smrit.wordpress.com
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thx,
--Gopi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to