Example #1
0
File: 021.c Project: githubix/c
int main(void)
{
    int judge;
    int retry;
    
    initialize();
    
    do {
        jyanken();
        
        printf("I am %s and you are %s. \n", hd[comp], hd[human]);
        
        judge = (human - comp + 3) % 3;
        
        count_no(judge);
        
        disp_result(judge);
        
        retry = confirm_retry();
    } while (retry == 1);
    
    printf("%d win, %d lose, %d even. \n", win_no, lose_no, draw_no);
    
    return (0);
}
Example #2
0
int main(void)
{
    int judge;

    initialize();

    do {
        jyanken();
        printf("I choose %s, you choose %s.\n", hd[comp], hd[human]);
        judge = (human - comp + 3) % 3;
        count_no(judge);
        disp_result(judge);
    } while (win_no < 3 && lose_no < 3);
    printf(win_no == 3 ? "\n You win.\n" : "\n I win.\n");
    printf("%d win %d lose %d draw.\n", win_no, lose_no, draw_no);
    return 0;
}
Example #3
0
int main(void)
{
	int judge,retry;
	
	initialized();
	
	do{
		jyanken();
		
		printf("私は%sで、あなたは%sです\n",hd[comp],hd[human]);
		
		judge = (human - comp+3)%3;
		count_no(judge);
		disp_result(judge);
		retry = confirm_retry();
	}while(retry == 1);
	
	printf("%d勝 %d負 %d引き分け \n",win_no,lose_no,draw_no);
	
	return(0);
}
Example #4
0
int jm(void)
{
  int judge;
  int retry;

  initialize();

  do{

    jyanken();

           switch(ship){
	   case 0 : printf("雷は%sで、しれーかんは%sよ!\n", hd[comp], hd[human]);               break;
	   case 1 : printf("夕立は%sで、てーとくさんは%sだったっぽい~\n", hd[comp], hd[human]);  break;
	   case 2 : printf("私は%sで、提督は%sデース!\n", hd[comp], hd[human]);                 break;
	   case 3 : printf("私は%sで、貴様は%sだな\n", hd[comp], hd[human]);                     break; 
	   case 4 : printf("私は%sで、あなたは%sね\n", hd[comp], hd[human]);                     break;
	   case 5 : printf("あたしが%sで、提督は%sだな!\n", hd[comp], hd[human]);               break;
     }   

	
	judge = (human - comp + 3)% 3;

	count_no(judge);

	disp_result(judge);
  
	do{ retry = confirm_retry();
	}while(retry < 1 || retry > 2);
       
  }while(retry == 1);

  printf("\n\nクマー。審判役の球磨クマ。総合結果をお知らせするクマ。\n%d勝%d敗%d分けだったクま。\n",win_no,lose_no,draw_no); 
       return(0);
       
}