make an c program to convert centimetre in metre in kilometre
Answers
Answered by
1
#include <stdio.h>
int main()
{
float cm, meter, km;
/* Input length in centimeter from user */
printf("Enter length in centimeter: ");
scanf("%f", &cm);
/* Convert centimeter into meter and kilometer */
meter = cm / 100.0;
km = cm / 100000.0;
printf("Length in Meter = %.2f m \n", meter);
printf("Length in Kilometer = %.2f km", km);
return 0;
}
pls mark brainliest
Answered by
0
Enter length in centimeter = 1000
Output
Length in meter = 10 m Length in kilometer = 0.01 km
Similar questions
Social Sciences,
9 days ago
Science,
9 days ago
Math,
9 days ago
Accountancy,
19 days ago
English,
9 months ago
Math,
9 months ago