Every number in an array occure twice except one . Find that number?

#include
using namespace std;

int main()
{

int n;
cin>>n;
int arr[100];
int arr2[100]={0};
for(int i=0;i<n;i++)
{
    cin>>arr[i];
}
for(int i=0;i<n;i++)
{
    arr2[arr[i]]++;
}
for(int i=0;i<n;i++)
{
    if(arr2[arr[i]] < 2)
    cout<<arr[i];
    break;
}
return 0;

}

why is this giving no output ?

You are supposed to do this question using bitmasking concept.
Anyway, please save your code on ide.codingblocks.com and then share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.