1. Наф-наф . 2. Братьями . 3. чтобы не замёрзнуть .
Язык : PascalABC. NET
program number1;
const
L =31;
var
a : array[1..L] of shortint;
k : shortint;
begin
randomize;
for i : byte := 1 to L do
a[i] := random(-10, 10);
k :=0;
for i : byte := 10 to 20 do
k := k + a[i];
writeln(k);
end.
Using System;
public class Test
{
public static void Main()
{
double r, x, y;
Console.Write("r = ");
r = double.Parse(Console.ReadLine());
Console.Write("x = ");
x = double.Parse(Console.ReadLine());
Console.Write("y = ");
y = double.Parse(Console.ReadLine());
if ((y>=0)&&(x*x+y*y<=r*r)||(x<=0)&&(y>=-r)&&(y<=x))
Console.WriteLine("Точка попадает в область");
else Console.WriteLine("Точка не попадает в область");
Console.ReadLine();
}
}
Пример:
<span>r = 3
x = -1
y = -2
Точка попадает в область</span>