当前位置 : 主页 > 手机开发 > harmonyos >

poj 3299

来源:互联网 收集:自由互联 发布时间:2023-08-25
#includecstdio #includeiostream #includecmath using namespace std; int main() { char a,b,c; double x,y,z; double h,e; while(1) { cina; if(a=='E') break; cinxby; if(a=='T'b=='D') { e=6.11*exp(5417.7530*((1/273.16)-(1/(y+273.16)))); h=0.5555*
#include<cstdio> 

 #include<iostream> 

 #include<cmath> 

 using namespace std; 

 int main() 

 { 

char a,b,c; 

double x,y,z; 

double h,e; 

while(1) 

{ 

cin>>a; 

if(a=='E') 

break; 

cin>>x>>b>>y; 

if(a=='T'&&b=='D') 

{ 

e=6.11*exp(5417.7530*((1/273.16)-(1/(y+273.16)))); 

h=0.5555*(e-10.0); 

z=x+h; 

printf("%c %.1lf %c %.1lf %c %.1lf\n",a,x,b,y,'H',z); 

} 

if(a=='D'&&b=='T') 

{ 

e=6.11*exp(5417.7530*((1/273.16)-(1/(x+273.16)))); 

h=0.5555*(e-10.0); 

z=y+h; 

printf("%c %.1lf %c %.1lf %c %.1lf\n",b,y,a,x,'H',z); 

} 

if(a=='T'&&b=='H') 

{ 

h=y-x; 

e=h/0.5555+10.0; 

z=(log(e/6.11))/5417.7530; 

z=(273.16*273.16*z)/(-273.16*z+1); 

printf("%c %.1lf %c %.1lf %c %.1lf\n",a,x,'D',z,b,y); 

} 

if(a=='H'&&b=='T') 

{ 

h=x-y; 

e=h/0.5555+10.0; 

z=(log(e/6.11))/5417.7530; 

z=(273.16*273.16*z)/(-273.16*z+1); 

printf("%c %.1lf %c %.1lf %c %.1lf\n",b,y,'D',z,a,x); 
  

} 

if(a=='D'&&b=='H') 

{ 

e=6.11*exp(5417.7530*((1/273.16)-(1/(x+273.16)))); 

h=0.5555*(e-10.0); 

z=y-h; 

printf("%c %.1lf %c %.1lf %c %.1lf\n",'T',z,a,x,b,y); 

} 

if(a=='H'&&b=='D') 

{ 

e=6.11*exp(5417.7530*((1/273.16)-(1/(y+273.16)))); 

h=0.5555*(e-10.0); 

z=x-h; 

printf("%c %.1lf %c %.1lf %c %.1lf\n",'T',z,b,y,a,x); 

} 

} 

return 0; 
}

我想了一下,学我们专业的就应当想此题一样,要考虑全面,这是我们专业必有得品质

【本文由:盐城网页开发公司 http://www.1234xp.com/yancheng.html 复制请保留原URL】
上一篇:stl queue
下一篇:没有了
网友评论