tugas program searching c++
TUGAS PROGRAM SEARCHING C++ source code : #include<iostream> using namespace std; int main() { cout<<"Masukkan banyak Array : "; int k016; cin>>k016; int array[k016], h016,i016; // mengambil input for(int l016=0;l016<k016;l016++){ cout<<"Input "<<l016<<" Element: "; cin>>array[l016]; } //masuk array for(int a016=0;a016<k016;a016++){ cout<<"array[ "<<a016<<" ] = "; cout<<array[a016]<<endl; } cout<<"masukan kunci untuk penelusuran Array :"; cin>>h016; for(i016=0;i016<k016;i016++){ if(h016==array[i016]){ cout<<"kunci ditemukan pada index : "<<i016<<endl; break; } } if(i016 != k016){ cout<<"kunci ditemukan pada index : "<<i016; } else{ cout<<"kunci tidak di