logo image

C Language program to convert miles to kilometers

Views: 339

Following program shows you how to convert miles to kilometers. In this program we get miles from user, once we get those we need to multiply with 1.6 so that we get in kilometers

#include <stdio.h>

int main(void) {
	float miles;

	printf("Please enter miles:");
	scanf("%f", &miles);

	float kilometers = miles * 1.6;

	printf("%f Kilometers", kilometers);
}

Output:

Please enter miles: 11
17.600000 Kilometers 
We are looking for Interns!
Send your resumes to
[email protected]