#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
        int me;
        int com;
        int win, draw, lose;

        srand((int)time(NULL));

        for(win=0, draw=0, lose=0;lose==1; )
        {
                printf("바위는 1, 가위는 2, 보는 3 : ");
                scanf("%d", &me);
                com=rand()%3+1;
                if(me==1 && com==1) //비길때
                {        
                        printf("당신은 바위 선택, 컴퓨터는 바위 선택, 비겼습니다.");
                    draw++;
                }
                else if(me==2 && com==2)
                {
                        printf("당신은 가위 선택, 컴퓨터는 가위 선택, 비겼습니다.");
                        draw++;
                }
                else if(me==3 && com==3)
                {
                        printf("당신은 보 선택, 컴퓨터는 보 선택, 비겼습니다.");
                        draw++;
                }
                else if(me==1 && com==3)//졌을때
                {
                        printf("당신은 바위 선택, 컴퓨터는 보 선택, 당신이 졌습니다.");
                        lose++;
                }
                else if(me==2 && com==1)
                {
                        printf("당신은 가위 선택, 컴퓨터는 바위 선택, 당신이 졌습니다.");
                        lose++;
                }
                else if(me==3 && com==2)
                {
                        printf("당신은 보 선택, 컴퓨터는 가위 선택, 당신이 졌습니다.");
                        lose++;
                }
                else if(me==1 && com==2)//이길때
                {
                        printf("당신은 바위 선택, 컴퓨터는 가위 선택, 당신이 이겼습니다.");
                        win++;
                }
                else if(me==2 && com==3)
                {
                        printf("당신은 가위 선택, 컴퓨터는 보 선택, 당신이 이겼습니다.");
                        win++;
                }
                else if(me==3 && com==1)
                {
                        printf("당신은 보 선택, 컴퓨터는 바위 선택, 당신이 이겼습니다.");
                        win++;
                }
                else
                        printf("다시 선택하세요.");
        }

                printf("게임의 결과 : %d승, %d무n", win, draw);

        return 0;
}

시발 포문 어디가 잘못된겨... 랜드 함수를 저렇게 쓰는게 아님???