求大佬指教,为什么总是%72.73呀
#include <stdio.h>
int main(){
int A=0,B=0,C=0,Tot=0,n=0,count=0;
while(n!=-1){
scanf("%d",&n);
count++;
if(n==1){
A++;
Tot++;
}else if(n==2){
B++;
Tot++;
}else if(n==3){
C++;
Tot++;
}
}
printf("A=%d\n",A);
printf("B=%d\n",B);
printf("C=%d\n",C);
printf("Tot=%d\n",A+B+C);
if(A>count/2){
printf("A-yes");
}else if(B>count/2){
printf("B-yes");
}else if(B>count/2){
printf("C-yes");
}else
printf("all-NO");
}
int main(){
int A=0,B=0,C=0,Tot=0,n=0,count=0;
while(n!=-1){
scanf("%d",&n);
count++;
if(n==1){
A++;
Tot++;
}else if(n==2){
B++;
Tot++;
}else if(n==3){
C++;
Tot++;
}
}
printf("A=%d\n",A);
printf("B=%d\n",B);
printf("C=%d\n",C);
printf("Tot=%d\n",A+B+C);
if(A>count/2){
printf("A-yes");
}else if(B>count/2){
printf("B-yes");
}else if(B>count/2){
printf("C-yes");
}else
printf("all-NO");
}