#include<iostream>
#include<math.h>
#include<iomanip>
using namespace std;
int main()
{
char
t
,
d
,
h;
//T代表的是temperature,H代表的是humidex,D代表的是dewpoint
double
a
, b;
double
e
,
h1;
double
temperature
,
humidex
,
dewpoint;
while (
cin
>>
t
&&
t
!=
'E')
{
cin
>>
a
>>
h
>>b;
switch(
t)
{
case
'T'
:
switch(
h)
{
case
'D'
:
e
=
6.11
*
exp (
5417.7530
*
( (
1
/
273.16)
-
(
1
/ (b
+
273.16) ) ) );
h1
= (
0.5555)
* (
e
-
10.0);
humidex
=
a
+
h1;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<
a
<<
" D "
<<b
<<
" H "
<<
humidex
<<
endl;
break;
case
'H'
:
h1
=b
-
a;
e
=
h1
/
0.5555
+
10.0;
dewpoint
=
1
/ (
1
/
273.16
-
log(
e
/
6.11)
/
5417.7530 )
-
273.16;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<
a
<<
" D "
<<
dewpoint
<<
" H "
<<b
<<
endl;
break;
}
break;
case
'D'
:
switch(
h)
{
case
'T'
:
e
=
6.11
*
exp (
5417.7530
*
( (
1
/
273.16)
-
(
1
/ (
a
+
273.16) ) ) );
h1
= (
0.5555)
* (
e
-
10.0);
humidex
=b
+
h1;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<b
<<
" D "
<<
a
<<
" H "
<<
humidex
<<
endl;
break;
case
'H'
:
e
=
6.11
*
exp (
5417.7530
*
( (
1
/
273.16)
-
(
1
/ (
a
+
273.16) ) ) );
h1
= (
0.5555)
*
(
e
-
10.0);
temperature
=b
-
h1;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<
temperature
<<
" D "
<<
a
<<
" H "
<<b
<<
endl;
break;
}
break;
case
'H'
:
switch(
h)
{
case
'T'
:
h1
=
a
-b;
e
=
h1
/
0.5555
+
10.0;
dewpoint
=
1
/ (
1
/
273.16
-
log(
e
/
6.11)
/
5417.7530 )
-
273.16;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<b
<<
" D "
<<
dewpoint
<<
" H "
<<
a
<<
endl;
break;
case
'D'
:
e
=
6.11
*
exp (
5417.7530
*
( (
1
/
273.16)
-
(
1
/ (b
+
273.16) ) ) );
h1
= (
0.5555)
*
(
e
-
10.0);
temperature
=
a
-
h1;
cout
<<
fixed
<<
setprecision(
1)
<<
"T "
<<
temperature
<<
" D "
<<b
<<
" H "
<<
a
<<
endl;
break;
}
break;
}
}
return
0;
}
#include<math.h>
#include<iomanip>
using namespace std;
int main()
{
}