Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ Volume of a Sphere

    	int rad1;
    	float volsp;		
        cout<<" Input the radius of a sphere : ";
    	cin>>rad1;
    	volsp=(4*3.14*rad1*rad1*rad1)/3; //3.14 is the pie
        cout<<" The volume of a sphere is : "<< volsp << endl;
        cout << endl;
 
PREVIOUS NEXT
Tagged: #Volume #Sphere
ADD COMMENT
Topic
Name
5+9 =