===== PascalABC.NET =====
begin
var a := ArrRandom(12, -2, 15);
Println('Исходный массив');
a.Println;
Println('Отобранные элементы');
a[2:].Println;
Println('После сортировки');
a[2:].Sorted.Println
end.
Да, периметр равен K+K+S+S=2K+2S=2(K+S)
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double r, s, c;
cin >> r;
s = M_PI*r*r;
c = 2*M_PI*r;
cout.setf(ios::fixed);
cout.precision(3);
cout << s << "\n" << c << "\n";
return 0;
}
Пример:
5
<span>78.540
31.416</span>
Сделай цикл
for i:=1 to n (добавь переменную) do
begin
line(x+100,y, x1+100, y1)
end;
end.