双色球中奖问题, 运行时怎么不出结果? 求大神帮忙
#include<stdio.h>int main()
{
int red[] = {3,5,12,15,20,27};
int blue = 4;
int i,j,a[10],B,count = 0,flag = 0;
printf("请输入一注号码\n红色球为:\n");
for(i =0; i < 6 ;i++)
scanf("%d",&a[i]);
printf("蓝色球号码为:\n");
scanf("%d",B);
for(i =0;i < 6;i++)
for(j = 0; j < 6;j++)
if( red[i] == a[j]){
count++;
}
if(B == 4)
flag = 1;
if(count == 6 && flag == 1)
printf("中了一等奖!\n");
else if(count == 6 && flag ==0)
printf("中了二等奖!\n");
else if(count == 5 && flag == 1)
printf("中了三等奖!\n");
else if((count == 5 && flag == 0) || (count == 4 && flag == 1))
printf("中了四等奖!\n");
else if((count == 4 && flag == 0) || (count == 3 && flag == 1))
printf("中了五等奖!\n");
else if((count == 2 && flag == 1) || (count == 1 && flag == 1) || (count == 0 && flag == 1))
printf("中了六等奖!\n");
else
printf("对不起没有中奖!\n");
return 0;
}