Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Saturday, February 23, 2019

C Program to find Conversion of Miles into Kilometer by G Krishna Chauhan

#include<stdio.h> 
#include<conio.h> 

void main() 

float km,m,cm,ft,inch; 
clrscr(); 
printf("\n Enter the distance in kilometers:"); 
scanf("%f”,&km); 
m=km* 1000; 
cm=m*100; 
inch=cm/2.54; 
ft=inch/12; 
printf("\n Distance in meters: %f”,m); 
printf("\n Distance in centimeters: %f",cm); 
printf("\n Distance in feet: %f",ft); 
printf("\n Distance in inches: %f",inch); 
printf("\n press any key to exit."); 
getch(); 

No comments:

Post a Comment