#include<iostream>
#include<cmath>
using namespace std;
char s[2][2];
int main()
{
    int i;
    double h=0,t=0,d=0,temp,a[2];
    while(cin>>s[0] && s[0][0]!='E')
    {
        cin>>a[0]>>s[1]>>a[1];
        for(i=0;i<2;i++)
        {
            switch(s[i][0])
            {
            case 'T':
                t=a[i];
                break;
            case 'D':
                d=a[i];
                break;
            case 'H':
                h=a[i];
                break;
            }
        }
        if(h==0)
        {
            temp=6.11*exp(5417.7530*((1/(float)273.16)-( 1/(d+273.16) ) ));
            temp=0.5555*(temp-10.0);
            h=t+temp;
        }
        else if(t==0)
        {
            temp=6.11*exp(5417.7530*((1/(float)273.16)-( 1/(d+273.16) ) ));
            temp=0.5555*(temp-10.0);
            t=h-temp;
        }
        else
        {
            temp=h-t;
            temp=temp/0.5555+10.0;
            d=1/((1/(float)273.16)-log(temp/6.11)/5417.7530)-273.16;
        }
        cout.setf(ios::fixed);
        cout.precision(1);
        cout<<"T "<<t<<" D "<<d<<" H "<<h<<endl;
        t=0;
        h=0;
        d=0;
    }
    return 0;
}

 

 

相关文章:

  • 2022-12-23
  • 2021-12-09
  • 2021-10-01
  • 2021-04-12
  • 2021-09-03
  • 2022-01-21
  • 2021-09-12
  • 2021-07-31
猜你喜欢
  • 2021-11-19
  • 2021-07-26
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案