Problem State: Write macro definitions with arguments for calculation of area and perimeter of a triangle, a square and a…