Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std ;
- int r , l ;
- float v ;
- int cylvol (double,double);
- int main()
- {
- cout << "Enter cylinder's radius and its length:\n" ;
- cin >> r >> l ;
- cylvol (r,l);
- cout <<"The volume is: "<< v << endl;
- return 0 ;
- }
- int cylvol (double r ,double l)
- {
- v = r*r*l*3.14 ;
- return v ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement