Speeders Beware
Write a program that, given as input

;the distance (in feet) between two "checkpoints",
'
the time (in seconds) taken by an automobile to travel from the first checkpoint to the second, and
the speed limit (in miles per hour)
determines whether or not the average speed of the automobile ---in traveling from one checkpoint to the other--- exceeded the speed limit.
Reminder: There are 5280 feet in a mile and 3600 seconds in an hour.
Input Format: Input consists of 3 real numbers. The first real number corresponds to distance, the second corresponds to time and the third corresponds to speed limit.
Output Format: Refer sample output for details.
Sample Input 1:
50.0
0.6
55.0
Sample Output 1:
Speeding
Sample Input 2:
 2.5
0.035
55.0 Sample
Output 2: Not Speeding

#include < stdio . h >
 int main()
{
float a,b,c,d,e,f;
scanf("%f",&a);
scanf("%f",&b);
scanf("%f",&c);
d=a/5280;
e=b/3600;
f=d/e;
if( )
{
printf("Speeding");
}
else
{
 printf("Not Speeding");
}
return 0;
}

No comments: