Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ Volume of a Cylinder

    	int rad, height;
    	float vol;

        cout <<" Input the radius of a cylinder: ";
    	cin >> rad;

        cout << "Input the height of a cylinder: ";
        cin >> height;

    	vol = (3.14 * rad * rad * height) ; //3.14 is the pie

        cout << " The volume of a sphere is : "<< vol << endl;
        cout << endl;
Comment

PREVIOUS NEXT
Code Example
Cpp :: Accpt array input in single line in cpp 
Cpp :: std vector c++ 
Cpp :: char size length c++ 
Cpp :: how to initialize a vector of pairs in c++ 
Cpp :: cpp string slice 
Cpp :: c++ function default argument 
Cpp :: c++ rand include 
Cpp :: sorting vector elements c++ 
Cpp :: sina + sinb formula 
Cpp :: concatenate two vectors c++ 
Cpp :: c++ basic snippet 
Cpp :: methods available for a stl vector 
Cpp :: getline(cin string) not working 
Cpp :: cpp mark getter as const 
Cpp :: reverse sort a vector 
Cpp :: c++ do every 1 minutes 
Cpp :: tree to array c++ 
Cpp :: c++ operator overloading 
Cpp :: array length c++ 
Cpp :: define in cpp 
Cpp :: c++ switch statement 
Cpp :: stl c++ 
Cpp :: swap in cpp 
Cpp :: find function in c++ 
Cpp :: kmp algorithm c++ 
Cpp :: il2cpp stuck unity 
Cpp :: one away coding question 
Cpp :: C++ linked list iterator 
Cpp :: full implementation of binary search tree in C++ 
Cpp :: c++ hash map key count 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =