User:Nur Hossain bd

int main{ int i,n,a[100],key,loc,f=0;
 * 1) include

printf("Enter the Array Size.\n"); scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]);

printf("Enter the Search Key\n"); scanf("%d",&key); for(i=0;i<n;i++){ if(key==a[i]){ loc=i; printf("Found\n"); printf("Location=%d",loc); f=1; break; }

} if(f==0){ printf("Not Found"); }

}