Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "figure.h"
- #include <cmath>
- Figure::Figure(double r0): r(r0) {}
- double Figure::volume() {
- return 4.0/3.0*M_PI*pow(r, 3);
- }
- double Figure::square_area() {
- return 4*M_PI*pow(r, 2);
- }
- void Figure::change_size(double x){
- this -> r = r*x;
- }
Add Comment
Please, Sign In to add comment