Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Given an integer array {1, 2, 2, 3, 4, 5}, print out the elements that are not duplicated in the array.
Given an integer array {1, 2, 2, 3, 4, 5}, print out the elements that are not duplicated in the array.
# include & ltstdio.h & gt

int? Master ()

{

int? a[]={ 1,2,2,3,4,5 };

int? hash[ 100]={0},I,j;

for(I = 0; I< sizeof (a)/sizeof (a [0]); i++)

hash[a[I]]++;

for(I = 0; I< 100; i++)

If (hash [i])

printf("%d ",I);

printf("\b? \ r \ n ");

for(I = 0; I< 100; i++)

? if(hash[I]& gt; 1)

While (hash [i]-)

? printf("%d ",I);

printf("\b? \ r \ n ");

Return? 0;

}