linear search
#include <iostream>
using namespace std;
int main() {
int A[6], n= 6, key;
for(int i=0;i<n;i++){
cin>> A[i];
}
cin>>key;
for(int i=0;i<n;i++){
if(A[i]==key){
cout<<"found the key at index "<<i;
return 0;
}
}
cout<<"key is not found";
return 0;
}INFO