Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. void Cylinder(double r,double h,double *S,double *V){
  7. double pi=3.14;
  8. *S=2*pi*r*(r+h);
  9. *V=pi*r*r*h;
  10. }
  11.  
  12. int main()
  13. {
  14. double r,h,S,V;
  15. for(int i=0;i<5;i++){
  16. cout<< "R:" <<endl;
  17. cin>>r;
  18. cout<< "H:" <<endl;
  19. cin>>h;
  20. Cylinder(r,h,&S,&V);
  21. cout<< "Pole:" <<S<<" , Objetosc:"<<V<<endl;
  22.  
  23. }
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement