#include #include "R2Contour.h" using namespace std; int main() { cout << "Enter a number of vertices: "; int n; if (!(cin >> n) || n <= 0) return (-1); R2Contour contour; cout << "Enter vertices of a contour:" << endl; for (int i = 0; cin.good() && i < n; ++i) { R2Point p; cin >> p; contour.push_back(p); } cout << contour << endl; cout << "Perimeter of the contour: " << contour.perimeter() << endl; cout << "Centroid: " << contour.centroid() << endl; cout << "Signed area: " << contour.signedArea() << endl; return 0; }