#include<stdio.h>
int main()
{
int A=0,B=0,C=0,sum=0,a[1000],Tot=0,i=0;
while(scanf("%d",&a[i])!=EOF&&a[i]!=-1)
{
if(a[i]==1)A++;
if(a[i]==2)B++;
if(a[i]==3)C++;
sum++;
}
Tot=A+B+C;
printf("A=%d\n",A);
printf("B=%d\n",B);
printf("C=%d\n",C);
printf("Tot=%d\n",Tot);
if(A>sum/2)printf("A-yes");
if(B>sum/2)printf("B-yes");
if(C>sum/2)printf("C-yes");
else printf("all-NO");
}
全部评论
(2) 回帖