for(i=0;i<strlen(array1);i++)
for(j=0;j<strlen(array2);j++)
for(k=0;k<strlen(array3);k++)
if(array1[i]+array2[j]+array3[k]==0)
printf("\n{%+d,%+d,%+d}",array1[i],array2[j],array3[k]);


Anuj Nagpal
3rd Year
MNIT JAIPUR

On Wed, Sep 14, 2011 at 11:02 AM, raj singh <[email protected]> wrote:

> *Write a program to find out the combination of an element of each array 
> gives a result 0.*
> For example:
>
> array 1: {2,1,4,7}
> array 1: {3,-3,-8,0}
> array 1: {-1,-4,-7,6}
>
>
> Output:
>
> pairs =
>
> {2,-8,6}
> {1,3,-4}
> {4,-3,-1}
> {7,0,-7}
>
>  --
> 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