Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- void Cylinder(double r,double h,double *S,double *V){
- double pi=3.14;
- *S=2*pi*r*(r+h);
- *V=pi*r*r*h;
- }
- int main()
- {
- double r,h,S,V;
- for(int i=0;i<5;i++){
- cout<< "R:" <<endl;
- cin>>r;
- cout<< "H:" <<endl;
- cin>>h;
- Cylinder(r,h,&S,&V);
- cout<< "Pole:" <<S<<" , Objetosc:"<<V<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement