zoukankan      html  css  js  c++  java
  • POJ 3299 Humidex(简单的问题)

    【简要题意】:什么是温度,湿度……,之间的转换。。

    【分析】:式已被赋予。

    // 252k 0Ms
    /*
    	当中exp表示的是求e的x次幂
    	解法就直接依据题目中的公式解决就好!! 
    */
    #include<iostream>
    #include<iomanip>
    #include<cmath>
    using namespace std;
    
    int main()
    {
    	double t,d,h;
    	char alpha;
    	while(1)
    	{
    		
    		t = d = h = 101;
    		for(int i = 0;i<2;i++)
    		{
    			cin>>alpha;
    			if(alpha == 'E') return 0;
    			
    			else if(alpha == 'T')
    				cin>>t;
    			else if(alpha == 'D')
    				cin>>d;
    			else
    				cin>>h;
    		}
    		
    		if(h == 101)
    			h=t+0.5555*(6.11*exp(5417.7530*(1/273.16-1/(d+273.16)))-10);
    		if(d == 101)
    			d=1/((1/273.16)-((log((((h-t)/0.5555)+10.0)/6.11))/5417.7530))-273.16;
    		if(t == 101)
    			t=h-0.5555*(6.11*exp(5417.7530*(1/273.16-1/(d+273.16)))-10);
    		cout<<setprecision(1)<<fixed<<"T "<<t<<" D "<<d<<" H "<<h<<endl;
    	}
    }


    版权声明:本文博客原创文章。博客,未经同意,不得转载。

  • 相关阅读:
    Python数据分析与爬虫
    Python例题集
    Python知识点复习
    Python内置函数---ord()
    关于Xpath
    初学爬虫(3)
    python操作csv文件
    初学爬虫(二)
    网络爬虫引发的问题及robots协议
    初学爬虫(一)
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/4681273.html
Copyright © 2011-2022 走看看