C Program to Convert a Length from Kilometers to Meters

0
4
digitalample eye
Write a program to convert a length from kilometers to meters.

C Code,

#include <stdio.h>
#include <conio.h>
void main()
{
int km, m;
clrscr();
printf("Enter the Kilometer:");
scanf("%d",&km);
m=km*1000;
printf("The length in meter=%d",m);
getch();
}

Output

Kilometer to Meters

LEAVE A REPLY

Please enter your comment!
Please enter your name here