#include <iostream>
using namespace std;
int main()
{
int b;
int ary[5];
int findnumber;
int f = 0;
for (int q = 0; q < 5; q++)
{
cout << "Enter you " << q + 1 << " Number\n";
cin >> ary[q];
}
cout << "\tEnter you number you want to find \n";
cin >> findnumber;
for ( b = 0; b < 5; b++)
{
if (findnumber == ary[b])
{
f = 1;
break;
}
else
{
f = 0;
}
}
if (f == 1)
{
cout << "your number is found :) \n";
cout << "your found number place in the array is \n"<<b+1;
}
else
{
cout << "number not found :( \n";
}
system("pause");
}
Sign up here with your email
ConversionConversion EmoticonEmoticon