write a c program to convert km to cm
Answers
Answered by
2
Answer:
Write a Program in Python for converting the value of Kilometer into cm...
- # This is a Python program which converts the value of Kilometer into cm.
- Kilometer=int(input("Enter the length in Kilometer:"))
- #convert Kilometer to cm.
- centimeter = 100000 * Kilometer;
Answered by
2
C0DE:
#include<stdio.h>
int main(){
float kilometer, centimeter;
printf("Enter the kilometer: \n");
scanf("%f10",&kilometer);
centimeter = kilometer * 100000;
printf("%.4f Kilometer = %.4f Centimeter\n",kilometer,centimeter); return 0;
}
EXAMPLE 0UTPUT
Enter the kilometer:
10
10.0000 Kilometer = 1000000.0000 Centimeter
Attachments:
Similar questions