Input
Input will consist of multiple problem instances. Each instance will consist of a single line containing six integers. The first two are the number of wins and losses (respectively) for Betty, the next two are the number of wins and losses for Cindy and the last two are the number of wins and losses for Zelda. A final line of six zeroes will terminate input and should not be processed.
Output
For each problem instance, output a single line indicating Anna's won-loss record, in the format shown in the example below.
Sample Input
10 3 6 7 8 5
1874 2945 2030 2789 1025 3794
0 0 0 0 0 0
Sample Output
Anna's won-loss record is 2-11.
Anna's won-loss record is 4709-110.
Source: East Central North America 2003, Practice
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
//四个人总共输赢的次数是回合次数的四倍,且输赢对半分,然后减去其他三个的
#include<iostream>
using namespace std;
int main()
{
int score[6];
int i,num,count;
while(true)
{
count=0;
for(i=0;i!=6;i++)
{
cin>>num;
score[i]=num;
if(num==0)
++count;//记录有6个零才表示退出,此题在一组输入的刚开始出现0并不能表明就是输入的结束(第一个人的胜场可能为0),必须全部6个数都为0
}
if(count!=6)
cout<<"Anna's won-loss record is "<<2*(score[0]+score[1])-score[0]-score[2]-score[4]<<"-"<<2*(score[0]+score[1])-score[1]-score[3]-score[5]<<"."<<endl;
else
break;
}
return 0;
}