Program for computing the volume of a sphere


     # include <iostream.h>
     int main( )
     {
       float r, volume, pi =  3.14152;
    cout << "\n Enter radius value : " ;
    cin >> r ;
    volume = (4 * pi * r * r * r) / 3 ;
                cout <<"\n volume : "<<volume ;
                return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|