#include "stdio.h"
int main()
{
int a[] = {2,4,5,7,12,13,18,21,24,27,30};
int b[] = {1,3,6,8,9,14,17,25,27,31};
int a_length;
int b_length;
int i;
int j;
int flag = 0;
int number = 0;
int value;
a_length = sizeof(a)/4;
b_length = sizeof(b)/4;
for(i = 0; i < a_length; i++)
{
for(j = 0; j < b_length; j++)
{
number++;
if(a[i] == b[j])
{
value = a[i];
flag = 1;
goto end;
}
if(a[i] < b[j])
break;
}
}
end:
if(flag == 1)
{
printf("the value is %d \n",value);
printf("the number is %d \n",number);
}
else
printf("no the same value \n");
return 0;
}