|
|
问题:
An object moving in a circular path at a constant tangential velocity V. The radial acceleration required for the object to move in a circular path is given by the equation: a = V^2 / r. Where a is the centripetal acceleration of the object in m/s^2, V is the tangential velocity of the object is m/s, and r is the turning radius in meters. Suppose that the object is an aircraft, and answer the question:
Suppose that the aircraft is moving at 85% of the speed of sound. If the centripetal acceleration is 2g, what is the turning radius of the aircraft? (Sound of speed = 340 m/s, 1g = 9.81 m/s^2)
执行范例:
Enter the speed of the aircraft (as a percentage of the speed of sound): .85
Enter the centripetal acceleration (in standard gravity): 2
The turning radius is: 289.00
我的代码如下:
#include <stdio.h>
#define SOUND 340
#define G 9.81
int main()
{
int inc;
float rad;
float vel;
float per;
float acc;
printf("Enter the speed of the aircraft (as a percentage of the speed of sound): ");
scanf("%f", &per);
printf("Enter the centripetal acceleration (in standard gravity): ");
scanf("%d", &inc);
acc = G * 2;
vel = SOUND * per;
rad = (vel * vel) / acc;
printf("The turning radius is: %.2f meters\n", rad);
return (0);
}
问题:
我的程序中怎么也得不到turning radius = 289。 请大家帮我看下问题在哪里。 |
|