using System;
internal class Program {
private static void Main() {
Console.WriteLine("Введите минимум для счетчика");
var min = int.Parse(Console.ReadLine() ?? throw new ());
Console.WriteLine("Введите максимум для счетчика");
var max = int.Parse(Console.ReadLine() ?? throw new ());
Console.WriteLine("Введите значение для счетчика");
var v = int.Parse(Console.ReadLine() ?? throw new ());
var counter = new Counter(max, min, v);
Console.WriteLine("Введите + для увеличение и - для уменьшения, иное для выхода");
do {
var c = Console.ReadKey();
if (c.KeyChar == '+') counter.Increase();
else if (c.KeyChar == '-') counter.Decrease();
else break;
Console.WriteLine($" => {counter.Value}");
} while (true);
Console.ReadKey();
}
}
public class Counter {
public readonly int Maximum;
public readonly int Minimum;
public int Value { private set; get; }
public Counter(int maximum, int minimum, int counter) {
this.Maximum = maximum;
this.Minimum = minimum;
counter = Math.Min(this.Maximum, counter);
counter = Math.Max(this.Minimum, counter);
this.Value = counter;
}
private Counter() {
this.Maximum = 10;
this.Minimum = 0;
this.Value = 5;
}
public void Increase() {
var value = this.Value + 1;
if (value > this.Maximum || value < this.Minimum)
return;
this.Value++;
}
public void Decrease() {
var value = this.Value - 1;
if (value > this.Maximum || value < this.Minimum)
return;
this.Value--;
}
}
program z3;
var x1,x2,x3,y1,y2,y3,ac,ab,bc,a1,b1:real;f,f1:text;
begin
assign (f, 'z1.dat');
rewrite(f);
readln(x1,y1);
readln(x2,y2);
readln(x3,y3);
writeln(f,x1,y1);
writeln(f,x2,y2);
writeln(f,x3,y3);
close(f);
ac:=sqr(x1-x3)+sqr(y1-y3);
ab:=sqr(x2-x1)+sqr(y2-y1);
bc:=sqr(x3-x2)+sqr(y3-y2);
b1:=(ab+bc-ac)/(2*sqrt(ab*bc));
a1:=(ac+ab-bc)/(2*sqrt(ac*ab));
if (a1 < 0) or (b1 < 0) then
begin
assign(f1, 'z1.rez');
rewrite(f1);
writeln('na prodolzenue');
writeln(f1,'na prodolzenue');close(f1)
end
else
begin
assign(f1, 'z1.rez');
rewrite(f1);
writeln ('na otrezke');
writeln(f1,'na otrezke');
close(f1)
end
end.