Write a pseudocode for finding the position of an element in an array of n numbers.
Answers
Answered by
0
int find( int A[] , int n, int item)
{
int i;
for(i=0, i<n, i++)
{
if(A[]==item)
{
break;
}
return i;
}
return -1;
}
{
int i;
for(i=0, i<n, i++)
{
if(A[]==item)
{
break;
}
return i;
}
return -1;
}
Similar questions