Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-07 Thread prasad rao
Thanks But it is used bigint but find a value without using bigint. On 4 September 2010 11:54, Shravan wrote: > http://ideone.com/4wj5t > > On Sep 3, 10:52 pm, Discover wrote: > > But how the number(in decimal form) will be displayedif ques > > demands so. > > > > On Sep 2, 1:49 pm, saurabh

[algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-04 Thread Shravan
http://ideone.com/4wj5t On Sep 3, 10:52 pm, Discover wrote: > But how the number(in decimal form) will be displayedif ques > demands so. > > On Sep 2, 1:49 pm, saurabh singh wrote: > > > > > Suppose the number of shifts be x. > > Also let the integer be represented by 16 bits on that machine

[algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-03 Thread Discover
But how the number(in decimal form) will be displayedif ques demands so. On Sep 2, 1:49 pm, saurabh singh wrote: > Suppose the number of shifts be x. > Also let the integer be represented by 16 bits on that machine. > Now take int n= (int)(x/16 + 0.5), to take the upper cap on result :) . > S

Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-02 Thread prasad rao
can post the c program of what u ave said above On 2 September 2010 16:06, vikash jain wrote: > nice... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. >

Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-02 Thread vikash jain
nice... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group

Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-02 Thread saurabh singh
Suppose the number of shifts be x. Also let the integer be represented by 16 bits on that machine. Now take int n= (int)(x/16 + 0.5), to take the upper cap on result :) . SO having 2^x will be same as doing 2<<(x-1) so essentially if we represent the resultant number in a linked list of nodes, wher

Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-02 Thread ashish agarwal
I think it will be 1< wrote: > Maybe you misunderstand the question. > The question is how to compute 2^X where 0 <= X <= 9? > How? > > On Wed, Sep 1, 2010 at 10:48 PM, Ruturaj wrote: > > a 5 digit number is of order 10^5 which is << 10^16 of which int in C > > is of size. > > Just multip

Re: [algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-01 Thread Yan Wang
Maybe you misunderstand the question. The question is how to compute 2^X where 0 <= X <= 9? How? On Wed, Sep 1, 2010 at 10:48 PM, Ruturaj wrote: > a 5 digit number is of order 10^5 which is << 10^16 of which int in C > is of size. > Just multiply both numbers. > > On Sep 2, 10:39 am, pras

[algogeeks] Re: Take 5 digit number and find 2 power that number.............

2010-09-01 Thread Ruturaj
a 5 digit number is of order 10^5 which is << 10^16 of which int in C is of size. Just multiply both numbers. On Sep 2, 10:39 am, prasad rao wrote: > Program that takes a 5 digit number and calculates 2 power that number and > prints it and should not use the Big-integer and Exponential Function'