Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ Converting Centimeters to Kilometers

    int centimeter;
    float meter,kilometer;

    cout<<"Input the distance in centimeter: ";
    cin>>centimeter;

    meter=centimeter*0.01;  //m=cm*0.01
    kilometer=centimeter/100000;    //d(km) = d(cm) / 100000

    cout<<"The Distance of "<<centimeter<<" centimeters in meters is "<<meter;
    cout<<" and "<<kilometer<<" in kilometers";
Comment

PREVIOUS NEXT
Code Example
Cpp :: controlling in windows 
Cpp :: multiply image mat by value c++ 
Cpp :: multiply two Mat in c++ element per element 
Cpp :: search update delete files in c++ 
Cpp :: error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ 
Cpp :: how to create a pair of double quotes in c++ 
Cpp :: retourner pointeur de type qstringlist qt 
Cpp :: file handling 
Cpp :: precision of fixed in c++ 
Cpp :: draw rect outline sdl2 
Cpp :: cuda __constant__ 
Cpp :: how to specify how many decimal to print out with std::cout 
Cpp :: Return multiple values from a function using pointers 
Cpp :: reverse an array using pointers in c++ 
Cpp :: c++ check open processes 
Cpp :: taking input from user in array in c++ 
Cpp :: prime number program 
Cpp :: how to declrae an array of size 1 
Cpp :: macro c++ 
Cpp :: or in cpp 
Cpp :: how to change string to lowercase and uperCase in c++ 
Cpp :: cpp merge two sets 
Cpp :: minimum spanning trees c++ 
Cpp :: C++ convert integer to digits, as vector 
Cpp :: string reversal 
Cpp :: c++ program to find prime number using function 
Cpp :: c++ initialize array 1 to n 
Cpp :: max value of double c++ 
Cpp :: C++ Swap 2 Variables Without Using 3rd Variable 
Cpp :: c++ random number between 0 and 1 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =