import java.util.*;
public class Main {
public static void main(String[] args){
Scanner scanner=new Scanner(System.in);
double profit=0.65;
String str="";
for(int i=0;i<3;i++){
double a=scanner.nextDouble();
double b=scanner.nextDouble();
double c=scanner.nextDouble();
if (a>b&&a>c){
str=str+" "+"W";
profit*=a;
}
if (b>a&&b>c){
str=str+" "+"T";
profit*=b;
}
if (c>a&&c>b){
str=str+" "+"L";
profit*=c;
}
}
str=str+" "+String.format("%.2f",(profit-1)*2);
System.out.println(str.substring(1,str.length()));
}
}
1011.World Cup Betting Java
最新推荐文章于 2024-07-12 16:26:30 发布
本文详细描述了一个Java程序,使用Scanner接收用户输入的三个数,根据最大值更新利润变量,最后输出经过计算后的结果,体现了简单的业务逻辑处理。
摘要由CSDN通过智能技术生成