+ 2
Can anyone make linear search program with only using loops.
2 Answers
+ 7
you can also check like this
let we searching for 5.
while(search!=5)
{
if(search==5)
{print successful;
break;
}
}
+ 2
position <- 0
found <- False
while position < len(List) and not found:
if List[position] = item:
found <- True
position <- position + 1