#define square(a) ((a) * (a)) struct point { int x; int y; }; int main() { const int numofpoints = 4; point points[numofpoints]; double p = 0; for (int i = 0; i < numofpoints - 1; i++) p += sqrt(square(points[i + 1].x - points[i].x)) + square(points[i + 1].y - points[i].y)); p += sqrt(square(points[numofpoints - 1].x - points[0].x)) + square(points[numofpoints - 1].y - points[0].y)); }
Спасибо
Ответ дал: Гость
program chislo;
var n,delit,count,ccount: integer; beginread(n); count: =0; ccount: =0; for delit: =1 to n doif n mod delit = 0 thenbegincount: =count+1; if (delit mod 2 = 0) then ccount: =ccount+1; end; writeln('делителей: ',count); writeln('четных делителей: ',ccount); end.
Популярные вопросы