-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1011.cpp
More file actions
35 lines (33 loc) · 685 Bytes
/
1011.cpp
File metadata and controls
35 lines (33 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// 1011.cpp
// 算法
//
// Created by 王怡凡 on 2017/5/17.
// Copyright © 2017年 王怡凡. All rights reserved.
//
#include<cstdio>
using namespace std;
char res[3] = {'W','T','L'};
int main() {
float num[3],odd,max,product=1;
char cho[3];
int i,j,choice;
for(i=0;i<3;i++) {
max = 0;
for(j=0;j<3;j++) {
scanf("%f",&odd);
if(odd>max) {
max = odd;
choice = j;
}
}
num[i] = max;
cho[i] = choice;
}
for(i=0;i<3;i++) {
product *= num[i];
printf("%c ",res[cho[i]]);
}
printf("%.2f",(product*0.65-1)*2);
return 0;
}