#define size 10
void sort ( int[]);
void seqsearch (int[], int);
void binarysearch (int [], int);
void main ()
{
int list[] = {10,19,18,17,15,14,13,12,11};
int target;
printf("\nEnter the value to search : ");
scanf("%d",&target);
seqsearch(list,target);
}
void seqsearch(int list[], int t)
{
int i=0;
while(i
if( i
else
printf("\nTarget not in the list\n");
}
No comments:
Post a Comment