1.fopen 안씀

2.간략대충씀

3.컴파일안해봄


int score_a=10,

    score_b=10,

temp=0,n=0;


while(score_a>0 && score_b>0){

printf("------------ 제 %d 경기 ------------\n",n);

scanf("%d %d",&score_a,&score_b);

temp=score_a-score_b;

if(temp>0){

printf("a님이 %d 스코어 이득!",temp);

score_a+=temp;

score_b-=temp;

}else if(temp<0){

printf("b님이 %d 스코어 이득!",temp);

score_b+=temp;

score_a-=temp;

}else{

printf("무승부");

}

++n;

printf("\n\n");

}

if(score_a<=0){

printf("승자 b");

}else{

    printf("승자 a");

}










메렁