Skip to content

Instantly share code, notes, and snippets.

@HammadMaqbool
Created August 5, 2016 16:35
Show Gist options
  • Save HammadMaqbool/4c50d3de6748eb5056fb1534b7445e8b to your computer and use it in GitHub Desktop.
Save HammadMaqbool/4c50d3de6748eb5056fb1534b7445e8b to your computer and use it in GitHub Desktop.
#include<iostream.h>
#include<conio.h>
void main()
{
int location=-1,item;
int arr[9];
cout<<"Enter the Data";
for(int i=0; i<=9;i++)
{
cin>>arr[i];
}
cout<<"Enter the data You want to Find";
cin>>item;
for(int j=0;j<=9;j++)
{
if(arr[j]==item)
{
cout<<"Item Found at Location "<<j;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment