With my experiences with C++(I'm a new), I will recommend you to create distinct functions and classes, then execute it in main (you can use switch there).
#include <cmath>
double findCircleArea(double radius) {
/* You can add more decimals to get more exactly */
/* pow(double, double) is used for calculating squares */
double circleArea = pow(radius, 2) * 3.14159265;
return circleArea;
}
double findSquareArea(double side) {
double squareArea = pow(side, 2);
return squareArea;
}
double findTriangleArea(double side) {
double triangleArea = pow(side, 2) / 2;
return triangleArea;
}
And for the perĂmetres you do the same. And then execute them on main function.