Const int neededInputs = 8;
try
{
int counterNegativeNumbers = 0;
int counterInLoop = 0;
while (counterInLoop < neededInputs)
{
Console.WriteLine("Type a number, please ");
int number = Int32.Parse(Console.ReadLine());
if(number < 1)
counterNegativeNumbers++;
counterInLoop++;
}
Console.WriteLine(String.Format("You`ve written {0} negative or zero numbers", counterNegativeNumbers));
}
catch(FormatException ex)
{
Console.WriteLine("Invalid format of the number");
}
<u>PascalABC.NET 3.3.5, сборка 1662 от 29.04.2018</u>
<u>Внимание! Если программа не работает, обновите версию!</u>
begin
(SeqGen(ReadInteger,i->1/(10*(i+1)+2)).Sum+1).Println
end.
<u>Пример</u>
10
1.26596470171236
Блок схема таблицы умножения на 3
Пн.A,B,C,D
вт.D,C,B,B,A
ср.A,A,A,C,B,D
чт.D,D,D,B,C,A
пт.A,B,A,A,D
A=9
B=6
C=4
D=7
Var x1a,y1a,x2a,y2a,L1,L2,x1b,y1b,x2b,y2b,:real;
begin;
readln(x1a);
readln(y1a);
readln(x2a);
readln(y2a);
readln(x1b);
readln(y1b);
readln(x2b);
readln(y2b);
l1:=sqrt(sqr(x2a-x1a)+sqr(y2a-y1a));
l2:=sqrt(sqr(x2b-x1b)+sqr(y2b-y1b));
if I1>l2 then writeln('Первый');
if l1<l2 then writeln('Второй');
if l1=l2 then writeln('Равны');
end.