Write a program that reads a distance in yard, feet, inches and converts to metres.
Answers
Answered by
1
Explanation:
* C Program to convert input distance in meter, feet, inches, centimeter */
#include <stdio.h>
#include <conio.h>
int main() {
int distance;
float meter, feet, inches, centimeter;
printf("Enter the distance [in Kilometers]: ");
scanf("%d", & distance);
meter = distance * 1000;
feet = distance * 3280.84;
inches = distance * 39370.1;
centimeter = distance * 100000;
printf("Meter = %f\n", meter);
printf("Feet = %f\n", feet);
printf("Inches = %f\n", inches);
printf("Centimeters = %f\n", centimeter);
getch();
}
Similar questions