fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. #define TRIANGLE_PERIMETER(a,b,c) (a + b + c)
  5. #define SQUARE_PERIMETER(a) (a * 4)
  6. #define RECTANGLE_PERIMETER(a,b) ((a + b) * 2)
  7. #define QUADRILATERAL_PERIMETER(a,b,c,d) (a + b + c + d)
  8. #define CIRCLE_PERIMETER(a) (2 * 3.14 * a)
  9. #define SECTOR_PERIMETER(a,b) (a * (b + 2))
  10. int a = 5, b = 3, c = 15, d = 2, area;
  11. area = SECTOR_PERIMETER(a,b);
  12. printf ("Area of rectangle"
  13. " is: %d",
  14. area);
  15. return 0;
  16.  
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Area of rectangle is: 25