c++ program to convert the distance entered in kilometres into meter and centimetres
Answers
Answered by
4
#include<iostream>
using namespace std;
int main()
{
float km, m;
cout<<"Enter the distance in kilometers : ";
cin>>km;
m = km * 1000;
cm=m*100;
cout<<"The equivalent distance in meters is : "<<m;
cout<<"The equivalent distance in centimeters is : "<<cm;
return(0);
}
using namespace std;
int main()
{
float km, m;
cout<<"Enter the distance in kilometers : ";
cin>>km;
m = km * 1000;
cm=m*100;
cout<<"The equivalent distance in meters is : "<<m;
cout<<"The equivalent distance in centimeters is : "<<cm;
return(0);
}
Similar questions
Geography,
8 months ago
Chemistry,
8 months ago
Math,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago