this is what I have. it is skipping over the zero. how can I fix that? I'm trying to count the number of times the numbers are duplicated.
void hit_rate(int a, int cmset[])
{
int i, j, k=0;
for(i=0;i<a;i++){
for(j=i;j<a;j++){
if((cmset[i] == cmset[j])){
k++;
}
}
printf("%d\n",k);
k=0;
}
}
cmset k **now** prints
4 2
6 1
0 3
0 2
0 1
1 1
2 1
4 1
for(j=0;j<=1;j++)is that correct?