Guest User

Untitled

a guest
Apr 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include "figure.h"
  2. #include <cmath>
  3.  
  4. Figure::Figure(double r0): r(r0) {}
  5.  
  6. double Figure::volume() {
  7.  
  8. return 4.0/3.0*M_PI*pow(r, 3);
  9. }
  10.  
  11. double Figure::square_area() {
  12. return 4*M_PI*pow(r, 2);
  13. }
  14.  
  15. void Figure::change_size(double x){
  16. this -> r = r*x;
  17. }
Add Comment
Please, Sign In to add comment