#include <iostream>
using namespace std;
const int N=10;
void Losuj(int A[])
{
for (int i=0;i<N;i++) A[i]=rand()%1000;
}
void Wypisz(int A[])
{
cout << "tablica:" << endl;
for (int i=0;i<N;i++) cout << i << ":"<< A[i] << endl;
}
bool SzukajLin(int A[], int x)
{
for (int i=0;i<N;i++)
if (A[i]==x) return true;
return false;
}
int main()
{
int A[N];
srand(time(NULL));
Losuj(A);
Wypisz(A);
int x;
cout << "Podaj x:";
cin >> x;
if (SzukajLin(A,x)) cout << x << " jest w tablicy A" << endl;
else cout << x << " nie ma w tablicy A" << endl;
return 0;
}