参考博客:

题意:

一根两端固定在两面墙上的杆 受热弯曲后变弯曲

求前后两个状态的杆的中点位置的距离

分析:见博客

代码:

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string.h>
#include<iomanip>
using namespace std;
//const double esp=1e-5;
int main()
{
double L,n,c,s,r,h;
while(~scanf("%lf %lf %lf",&L,&n,&c))
{
if(L<&&n<&&c<)
break;
//
s=L*(+n*c);
double low=0.0;
double high=L*0.5;
double mid;// printf("%lf\n",s);
while(high-low>0.00001)
{
mid=(high+low)/;
r=(*mid*mid+L*L)/(*mid);
if(*r*asin(L/(*r))<s)
low=mid;
else
high=mid;
}
h=mid;
cout<<fixed<<setprecision()<<h<<endl;
//printf("%.3f\n",mid);
}
}

最新文章

  1. 为什么 NaN 不等于自身?
  2. WPF自定义控件与样式(3)-TextBox &amp; RichTextBox &amp; PasswordBox样式、水印、Label标签、功能扩展
  3. Error: Cannot open main configuration file &#39;//start&#39; for reading! 解决办法
  4. Laravel5设计json api时候的一些道道
  5. [python]非常小的下载图片脚本(非通用)
  6. 关于 Maven 的插件maven-war-plugin
  7. powershell查看pc信息的常用命令
  8. CCS 5 XDS100 仿真连接错误Error connecting to the target【瓦特芯笔记】
  9. appStore上传苹果应用程序软件发布流程(之前都是同事发,复制一份备用)
  10. iOS开发经验总结(下)
  11. IOS_视图实现圆角效果的三种方法及比较
  12. 《Effective C++ 》学习笔记——条款02
  13. .net core 2.0学习笔记(五):程序配置&amp;ConfigurationManager
  14. zabbix监控ssl证书到期时间
  15. compareTo的用法
  16. RPC -dubbo 服务导出实现
  17. Mybatis Generator配置详解
  18. 关闭或开启memory_target
  19. HTTP协议--MyWebServer
  20. CodeFirst时使用T4模板

热门文章

  1. Java finally块
  2. linux下载文件到本地
  3. 转 Nginx Access Log日志统计分析常用命令
  4. SpringBoot集成Thymeleaf模板
  5. Pytest---yield
  6. Sed的查,删,增,改
  7. redis搭建主从
  8. git 分支相关操作
  9. hightchart 报错 Error in mounted hook: &quot;Error: Highcharts error #17: www.highcharts.com/errors/17&quot;
  10. elasticsearch启动问题