piffy

geometry.cpp

Jan 1st, 2020
151
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data