i am trying to find any user entered value in a array which the user has previously entered the values of.
I made the following for finding which values were entered in array
bu
#include
#include
using namespace std;
void main ()
{
int a[10];
for(int i=0;i<10;i++)
{
cout<<"enter value : ";
cin>>a[i];
}
int random;
cin>>random;
int flag=0;
for(int i=0;i<10;i++)
{
if(a[i]==random)
{
flag=1;
cout<<"Found at a["<