{Выводит узор из 100 произвольно размещенных окружностей произвольного
радиуса и цвета}
uses Graph;
var
grDriver:integer;
grMode: integer;
grPath:string;
ErrCode:integer;
x,y,r: integer; ( координаты центра и радиус окружности }
i: integer;
begin
grDriver:=VGA;
grMode:=VGAHi;
grPath:=' ';
InitGraph (grDriver,grMode,grPath);
ErrCode:=GraphResult;
if ErrCode <> grOk then
begin
writeln ('Ошибка инициализации графического режима.1);
writeln ('Для завершения работы нажмите <Enter>');
readln;
Halt(l);
end;
Randomize;
for i:=l to 100 do
begin
x:=Random(640);
y:=Random(480);
r:=Random(240);
Setcolor(Random(16));
Circle(x,y,r);
end;
readin;
end.
Console.WriteLine("Введіть a: ");
int a = Console.ReadLine();
Console.WriteLine("Введіть b: ");
int b = Console.ReadLine();
Console.WriteLine("Введіть c: ");
int c = Console.ReadLine();
Console.WriteLine("Введіть x: ");
int x = Console.ReadLine();
Console.WriteLine("Введіть y: ");
int y = Console.ReadLine();
if(x>y){
int x = temp;
x = y;
y = temp;
}
int sum = 0;
if(a>x && a<y){
sum = sum+a;
}
if(b>x && b<y){
sum = sum+b;
}
if(c>x && c<y){
sum = sum+c;
}
Console.WriteLine("Сума");
Console.WriteLine(sum);