Write a program to convert Distance from kilometers into meters.

 

 

#include<stdio.h>

#include<conio.h>

int main()

{

long k;

clrscr();

printf(“Enter the distance in kilometers: “);

scanf(“%ld”, &k);     // %ld is used becouse we had used long data type.

printf(“Distance in meters is %ld”, k*1000);

getch();

return 0;

}