码迷,mamicode.com
首页 > 其他好文 > 详细

1011 World Cup Betting (20)(20 分)

时间:2018-08-01 18:14:44      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:har   can   code   std   style   nbsp   argc   printf   ++   

 

#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
#include<string.h>
int main(int argc,char const *argv[]){
    char s[]={W,T,L};
    double ans=1.0,tmp,a;
    int i,j,idx;
    for(i=0;i<3;i++ ){
        tmp=0.0;
        for(j=0;j<3;j++){
            scanf("%lf",&a);
            if(a>tmp){
                tmp=a;
                idx=j;
            }
        }
           ans*=tmp;
           printf("%c ",s[idx]);
    }
          printf("%.2f",(ans*0.65-1)*2);
      return 0;
}

 

1011 World Cup Betting (20)(20 分)

标签:har   can   code   std   style   nbsp   argc   printf   ++   

原文地址:https://www.cnblogs.com/sunnybowen/p/9402489.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!