- 
@ChatGPT 1+1为什么等于2 
- 
@ChatGPT 用c语言实现某次选举有两位候选人,编写统计选票的程序 
- 
guest说: 用c语言实现某次选举有两位候选人,编写统计选票的程序 #include 
 int main()
 {
 int voteA=0,voteB=0;
 char ch;
 printf("投票开始,投A输入A,投B输入B,结束输入N\n");
 while(1)
 {
 ch=getchar();
 switch(ch)
 {
 case 'A':voteA++;break;
 case 'B':voteB++;break;
 case 'N':printf("投票结束\n");goto end;
 default :printf("输入错误,请重新输入\n");
 }
 }
 end:
 printf("A得票:%d\n",voteA);
 printf("B得票:%d\n",voteB);
 return 0;
 }
 

 苹果中国推出账户充值 10% 奖励活动
 苹果中国推出账户充值 10% 奖励活动