Advertisement
Guest User

volume

a guest
Oct 30th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std ;
  3. int r , l ;
  4. float v ;
  5. int cylvol (double,double);
  6. int main()
  7.  
  8. {
  9.  
  10. cout << "Enter cylinder's radius and its length:\n"  ;
  11.  
  12. cin >> r >> l ;
  13.  
  14.  cylvol (r,l);
  15.  
  16. cout <<"The volume is: "<< v << endl;
  17. return 0 ;
  18.  
  19. }
  20.  
  21. int cylvol (double r ,double l)
  22. {
  23. v = r*r*l*3.14  ;
  24. return v ;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement