编程介的小学生 2019-05-17 15:43 采纳率: 20.5%
浏览 275

计算开车经过的路程的问题,怎么使用C语言代码编写程序的思想去实现呢?

Problem Description
One day , Teddy and WhereIsHeroFrom want to pay a visit to their friend yifenfei who are in another city.They own a car ,but the car is so small that it can only contains two people.But both Teddy and WhereIsHeroFrom can't drive a car,so they needs a driver to help them.
Now give you the speed of Teddy and WhereIsHeroFrom , and the speed of the car ,you are asked to worked out the least time Teddy and WhereIsHeroFrom need to spend if they want to reach yifenfei's home at the same time.You may suppose if one gets off the car ,the driver can turn around to carry the other one .

Input
Each line will contain three integers A (0<A<=1000), B(0<B<=10000) and C(0<C<=10^9). A stands for the speed of Teddy and WhereIsHeroFrom ,B stands for the speed of the car,C stands for the distance between the two cities .Process to end of file.

Output
For each case, output the least needed time in one line,accurate to three decimal places.

Sample Input
1 2 1

Sample Output
0.700

  • 写回答

1条回答 默认 最新

  • 随风飘荡012 2019-05-17 17:51
    关注

    图片说明
    时间=t+t1 用c写自己转换一下

    评论

报告相同问题?

悬赏问题

  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退