首页 > 其他分享 >足球胜平负的对冲玩法

足球胜平负的对冲玩法

时间:2022-11-26 10:00:53浏览次数:43  
标签:printf 胜平负 float 玩法 char 投注 0.0 足球 prcp

int main()
{
int i = 0;
float w, e, l;
char char_com = '0';
while(char_com !='p')
{
float win = 0.0;
float even = 0.0;
float lose = 0.0;
float prcp = 0.0;
float tla = 0.0;
printf("请输入胜平负赔率及本金:");
scanf("%f %f %f %f", &win, &even, &lose, &prcp);
w = prcp / win;
e = prcp / even;
l = prcp / lose;
tla = w + (e + l);
printf("买胜投注本金:%f\n", w);
printf("买平投注本金:%f\n", e);
printf("买负投注本金:%f\n", l);
printf("投注总金额:%f\n", tla);
printf("按任意键继续,按p键退出\n");
char_com = getchar();
}
return 0;
}

标签:printf,胜平负,float,玩法,char,投注,0.0,足球,prcp
From: https://www.cnblogs.com/zrk-8008/p/16926951.html

相关文章