pat 甲级 1011

pat 甲级 1011

#include
using namespace std;
int main()
{
  double a, b, c, mul = 1.0;
  for(int i = 0;i<3;i++)
  {
    cin>>a>>b>>c;
    if(a>b && a>c)
    {
      cout<<"W ";
      mul*=a;
    }
    else if(b>a && b>c)
    {
      cout<<"T ";
      mul*=b;
    }
    else
    {
      cout<<"L ";
      mul*=c;
    }  
  }
  mul = (mul*0.65 -1)*2;
  int temp = (mul+0.00500002)*100;
  mul = temp/100.0;
  printf("%.2lf",mul);
  return 0;
}

你可能感兴趣的:(PAT甲级)