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

2010-09-07 Thread prasad rao
> I think it will be 1< > > > > > On Wed, Sep 1, 2010 at 10:53 PM, Yan Wang >wrote: > > > > > >> Maybe you misunderstand the question. > > > >> The question is how to compute 2^X where 0 <= X <= 9? > > > >>

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. >

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

2010-09-01 Thread prasad rao
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's. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...

Re: [algogeeks] Re: Will miracle ever print ?

2010-08-29 Thread prasad rao
miracle never print on the screen. Because first preference is == and != after that &&. So data == -data is wrong so (0 && data!=0) is also wrong. On 29 August 2010 21:17, mohit wrote: > i think "never". > > On Aug 27, 10:45 pm, Raj N wrote: > > int data; // Initialize data during run time > >

Re: [algogeeks] Help with Increment Operators in C!

2010-08-29 Thread prasad rao
In printf, the cursor goes to left to right. so x++ + ++x + x++ 5 + 7 +7 = 19. ( Here x=5, then we put 5 in place of first x, after that x will be incremented(post increment) that means x is 6 and we take second x which is pre-increment and hence once again x will be incremented that means x is 7

Re: [algogeeks] Re: Subsequence

2010-08-25 Thread prasad rao
suppose we take an array like this 5,3, 2, 6,7, 4, 8,1, 0, 7, 9 Here 2, 6,7 4,8 and 7,9 are non decreasing sub sequences of array and we have to find sum of those sub sequences which is maximum. the sum of 2, 6,7 is 15. sum of 4, 8 is 12, and sum of 7, 9 is 16. maximum sum is 16. I