Advertisement
piffy

geometry.cpp

Jan 1st, 2020
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. const double PI = 3.14159;
  2.  
  3. double area_circle(double radius) {
  4.     return radius*radius*PI;
  5. }
  6. double area_rectangle(double base,double height) {
  7.     return base*height;
  8. }
  9. double area_triangle(double base,double height) {
  10.     return base*height;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement