因原文提交时问问提示含有政治词汇,所以只好截图提交,因此要麻烦各位爪哇高手了
做出来的话追加20分!
因原文提交时问问提示含有政治词汇,所以只好截图提交,因此要麻烦各位爪哇高手了
做出来的话追加20分!
就是要写个程序揭穿这游戏的阴谋,
int money;i=0;
int max=money;
int Mi=i;
printf("How many dollars do you have?");
scanf("%d",money);
while(money<=0)
{
if( ((((double)number /(double) UINT_MAX * 6.0) + 1)+(((double)number /(double) UINT_MAX * 6.0) + 1))==7) money+=4;else money--1;
if(money>max) {max=money;Mi=i;}
i++;
}
printf("You are broke after %d rolls.\n",i);
printf("You should have quit after %d rolls when you had $%d.",Mi,max);