107k views
3 votes
Write a C program to calculate the distance, in feet, of a trip that is 2.36 miles long. One mile is equal to 5,280 feet.

1 Answer

3 votes

Answer:

12460.799805 feet.

Step-by-step explanation:

#include <stdio.h> //include the libraries

int main()

{ float d,conv,dml; //define the variables

d=2.36; // set the distance value

conv=5280; //set the convertion factor

dml=d*conv; //(result) here, we are multiplying the distance and the factor

printf("%f",dml); //print the result as a float variable.

}

User Alexander Kahoun
by
8.4k points

No related questions found