Answer to Question #337076 in C for Vann

Question #337076

a runner runs 14 kılometers in 45 minutes and 30 sec-

onds. Write a program that displays the average speed in miles per hour. (Note that

 1 mile is 1.6 kilometers.)


1
Expert's answer
2022-05-04T17:39:45-0400

Exact correspondence to the task:

#include <stdio.h>

int main()
{
    int kil=14;
    int min=45;
    int sec=30;
    double speed;
    
    speed = (double)(((kil*3600)/((min*60)+sec))/1.6);
    printf("The average speed: %.2f miles per hour", speed);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS