Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ Converting Centimeters to Meters

    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 :: check file exist cpp 
Cpp :: watermelon codeforces solution 
Cpp :: c++ files 
Cpp :: print linkedstack cpp 
Cpp :: c++ console color some digits 
Cpp :: cpp iterate words from string 
Cpp :: expected number of trials to get n consecutive heads 
Cpp :: count function vector c++ 
Cpp :: compile notepad++ c++ 
Cpp :: set cmd size c++ 
Cpp :: extern shared memory 
Cpp :: c++ srand() 
Cpp :: ifstream relative file path 
Cpp :: c++ find key in hashmap 
Cpp :: prime number program in c 
Cpp :: convert a int to string c++ 
Cpp :: vector of int to string c++ 
Cpp :: print linked list recursively c++ 
Cpp :: sfml mouse button pressed 
Cpp :: c++ file exists 
Cpp :: how to get a letter from the user c++ string 
Cpp :: infinite loop c++ 
Cpp :: c++ looping 
Cpp :: how to copy one vector to another 
Cpp :: max of two elements c++ 
Cpp :: set precision with fixed c++ 
Cpp :: adding element in vector c++ 
Cpp :: c++ 2d vector assign value 
Cpp :: how to remove an element from a vector by value c++ 
Cpp :: c++ factorial 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =