程序没有输出
//求一个数组中重复的元素及次数
#include<stdio.h>
int main(){
int count;
scanf ("%d",&count);
int shuzu[count];
for(int i=0;i<count;i++)
scanf("%d",shuzu[i]);//遍历数组
for(int x=0;x<count;x++){
int sum=0;
int judge=0;
for(int y=x+1;y<count;y++){//找出x之后所有与其相同的元素
if(shuzu[x]==shuzu[y]){
judge=1;
sum++;
for(int m=y;m<count;m++)//覆盖相同的元素防止重复计数
shuzu[m]=shuzu[m+1];
y--;
}
}
if(judge==1) printf("%d出现了%d次",shuzu[x],sum);
}
return 0;
}