登录
首页 » C/C++ » 1046.-Plane-Spotting

1046.-Plane-Spotting

于 2013-12-21 发布 文件大小:1KB
0 68
下载积分: 1 下载次数: 3

代码说明:

  大多数自行车速度表工作通过使用霍尔效应传感器固定在自行车前叉。磁铁是附加到前轮上的辐条之一,它将与霍尔效应开关一次革命的车轮。速度计监测传感器计数轮革命。如果知道车轮的直径,距离可以很容易地计算如果你知道有多少革命的车轮。此外,如果时间完成革命,平均速度也可以计算出来。 对于这个问题,您将编写一个程序来确定总距离(英里)和平均速度(英里每小时)考虑到车轮直径,革命的数量和总时间的旅行。你可以假定前轮从未离开地面,并没有下滑或打滑。(Most bicycle speedometers work by using a Hall Effect sensor fastened to the front fork of the bicycle. A magnet is attached to one of the spokes on the front wheel so that it will line up with the Hall Effect switch once per revolution of the wheel. The speedometer monitors the sensor to count wheel revolutions. If the diameter of the wheel is known, the distance traveled can be easily be calculated if you know how many revolutions the wheel has made. In addition, if the time it takes to complete the revolutions is known, the average speed can also be calculated. For this problem, you will write a program to determine the total distance traveled (in miles) and the average speed (in Miles Per Hour) given the wheel diameter, the number of revolutions and the total time of the trip. You can assume that the front wheel never leaves the ground, and there is no slipping or skidding.)

文件列表:

1046. Plane Spotting.cpp,1141,2013-10-11

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696524资源总数
  • 103938会员总数
  • 55今日下载