Skip to content

Instantly share code, notes, and snippets.

@sohana08
Created December 30, 2016 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sohana08/d7cbc930daf3e6cfb8bf9640baabc376 to your computer and use it in GitHub Desktop.
Save sohana08/d7cbc930daf3e6cfb8bf9640baabc376 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int m;
cin>>m;
int arr[n];
int i;
for( i=0;i<n;i++)
{
cin>>arr[i];
}
for(i=0;i<n;i++)
{
if(arr[i]==m)
{
cout<<i<<endl;
}
}
return 0;
}
@sohana08
Copy link
Author

does anything seems wrong in this code?? because its giving me wrong answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment