#include<stdio.h>

void main()
{
int array[20],loop1,loop2,temp; // INITIALIZATION

printf("ENTER THE ARRAY SIZE");
scanf("%d",&num);

for(loop1=0;loop1<num;loop1++)
{
scanf("%d",&a[loop1]);
}


for(loop1=0;loop1<num;loop1++)
{
for(loop2=0;loop2<num;loop2++)  // SORTING
{
if(a[loop1]>a[loop2])
{
temp=a[loop1];
a[loop1]=a[loop2];
a[loop2]=temp;
}
}
}

for(loop1=0;loop1<num;loop1++)  // CONDITION CHECKING
{
if(a[loop1]=a[loop1+1]-1)
    printf("TWO NUMBERS ARE %d, %d and their sum is
%d",a[loop1],a[loop1+1],a[loop1]+a[loop+1]);
else
 printf("NO SUCH ENTERIES FOUND");
}
}


On 9/18/10, Raj Jagvanshi <raj.jagvan...@gmail.com> wrote:
>
> a[] = {4,1,2,3,4,5,40,41,19,20};
>
> print = 40 , 41
> sum  = 81;
>
>
>
> give me code
>
> --
> 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<algogeeks%2bunsubscr...@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 algoge...@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