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
Math,
8 months ago
English,
8 months ago
Math,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago