Computer Science, asked by pothurianjani, 3 months ago

program to convert and print distance into centimetres,meters,inches and feet

Answers

Answered by sbc1305
0

Answer:

Answer in C

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