#include using namespace std; void provjera(int* polje, int n){ int* pomocnoPolje = new int[n]; for (int i = 0; i < n; i++){ pomocnoPolje[i] = 0; } for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ if (polje[i] == polje[j]){ pomocnoPolje[i]++; } } } int brojac = 0; for (int i = 0; i < n; i++){ if (pomocnoPolje[i] == 1){ brojac++; } } int* polje1 = new int[brojac]; int poz = 0; for (int i = 0; i < n; i++){ if (pomocnoPolje[i] == 1){ polje1[poz] = polje[i]; poz++; } } for (int i = 0; i < brojac; i++){ cout << polje1[i] << " "; } } int main(){ int polje[10] = { 1, 1, 2, 3, 3, 5, 6, 7, 7, 11 }; provjera(polje, 10); cout << endl; return 0; delete[] polje; }