Ⅰ 求问,游戏的统计数据怎么做的

includelt;stdio.h;
includelt;stdlib.h;
int main()
{
char cq[][10]={;石头;,;剪刀;,;布;};
int guess=-1,r,youwin=0,mewin=0,daping=0,total=0;

srand(time(NULL));
while(1)
{
r=(int)((rand()/(RAND_MAX+1.0))*3);
printf(;0、石头;n1、剪刀;n2、布;n3、退出;n我已出,请你出:;);
scanf(;%d;,guess);
if(3==guess)
{
break;
}
else
{
total++;
printf(;这一次你出的是%s,我出的是%s,所以;,cq[guess],cq[r]);
if(0==guess1==r 1==guess2==r 2==guess0==r)
{
youwin++;
printf(;你赢了!;n;);
}
else if(guess==r)
{
daping++;
printf(;我们打平了!;n;);
}
else
{
mewin++;
printf(;我赢了!;n;);
}
}
}
printf(;总共玩了%d次,你赢了%d次,我赢了%d次,打平%d次!;n;,total,youwin,mewin,daping);
system(;PAUSE;);
return EXIT_SUCCESS;
}