Răspuns:
#include <iostream>
void Cautare_elemente_diferite(int lista_a[], int lista_b[])
{
static int size_a,size_b;
std::cout << "cate elemente vor fi adaugate in lista a? : "; std::cin >> size_a;
std::cout << "insereaza elemente in lista_a\n";
for (int i = 0; i < size_a; i++)
{
std::cout << "element-"<<i<<": "; std::cin >> lista_a[i];
}
std::cout << "cate elemente vor fi adaugate in lista b? : "; std::cin >> size_b;
std::cout << "insereaza elemente in lista_b\n";
for (int j = 0; j < size_b; j++)
{
std::cout << "element-" << j << ": "; std::cin >> lista_b[j];
}
for (int i = 0; i < size_a-1; i++)
{
if (lista_a[i] == lista_b[i])
{
continue;
}
else std::cout << lista_a[i];
}
}
int main()
{
int arr1[9], arr2[9];
Cautare_elemente_diferite(arr1, arr2);
}
//by N0nNaMe
Explicație: