FUNC1(i) (i*(i-1))=>so put i-1 as it is on i=>so (i-1*(i-1-1)) and i=8
so(8-1*(8-1-1))=>(8-1(6))=>2 and mul bu 8=16

On Sun, Aug 21, 2011 at 4:03 PM, Prakash D <[email protected]> wrote:

> FUNC2(8)
>
> ==> 8==0? 1: 8 * FUNC1(8-1)
> ==> 8==0? 1: 8*( 8-1* 8-1-1)
>
> ==>  8 * (8-8-2)
> ==> -16
>
> but why 16??
>
>  On Sat, Aug 20, 2011 at 7:02 PM, SuDhir mIsHra <[email protected]
> > wrote:
>
>>  #include<stdio.h>
>> #define FUNC1(i) (i*(i-1))
>> #define FUNC2(i) (i==0?1:i*FUNC1(i-1))
>> main()
>> {
>>         int i=8;
>>
>>
>>         printf("\n%d",FUNC2(i));
>> }
>>
>> --
>> 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.

Reply via email to