#include
#include
#include
#define abs(x) ((x)<0 ? -(x) : (x))<br>using namespace std;
int main()
{
srand(time(0));
int n, k, m = 0;
cout << "n = ", cin >> n;
int A[n], B[n];
cout <<"A("<<n<<"):";<br> for(int i = 0; i < n; i++)
cout <<" "<< (A[i] = rand() % (n*2+1) -n);<br>
cout << "\nk = ", cin >> k;
for(int i = 0; i < n; i++)
if (abs(A[i]) % 10 == k) B[m++] = A[i];
cout <<"B("<<m<<"):";<br> for(int i = 0; i < m; i++)
cout <<" "<< B[i];<br> return 0;
}