doesn it work like below ?


func2(8)= 8 * func1(7)

func1(7)= 7*6

so i=8*7*6???



On Sun, Aug 21, 2011 at 3:58 PM, Sanjay Rajpal <srn...@gmail.com> wrote:

> +1 to sagar
> Sanju
> :)
>
>
>
> On Sun, Aug 21, 2011 at 3:26 AM, sagar pareek <sagarpar...@gmail.com>wrote:
>
>> FUNC2(i) =  i==0?i*(i-1*(i-1-1))
>>
>> 8==0?1:8*(8-1*(8-1-1))
>> 8==0?1:8*(8-6)
>> 8==0?1:8*2
>> 8==0?1:16
>>
>> hence it will return 16
>>
>>
>> On Sun, Aug 21, 2011 at 11:40 AM, SuDhir mIsHra <
>> sudhir08.mis...@gmail.com> 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 algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> **Regards
>> SAGAR PAREEK
>> COMPUTER SCIENCE AND ENGINEERING
>> NIT ALLAHABAD
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Ayswarya S

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

Reply via email to