Hi there, this is getting me frustrated and I'm trying to solve this to keep working on my code:
I have an array of integers whose elements may be equal:
ex.: [1, 3, 3, 4, 10];
I want to save, inside another array, only the elements that are different among eachother. I tag my code below; I can't get where I do it wrong, in fact, it does not recognize the different numbers.
Thank you in advance for helping
S.
p.s. This is not homework, I've been out from the Uni since 2005 alreadyCode://Get rid of the double node numbers: s = 0; for(i=0; i<2*nbnd_el; i++){ for(k=0; k<2*nbnd_el; k++){ if( _node[k] =! _node[i] ){ _NODE[s] = _node[i]; s = s+1; printf("NODE = %d\n", _NODE[s]); } } }