program SumSeq;
{$APPTYPE CONSOLE}
uses
SysUtils;
//const m:Integer ;
var
i, j, m, s:Integer;
n: array of Integer;
begin
s:=0;
Writeln(m);
Writeln('vvedite m');
Readln(m);
SetLength(n,m);
for i:=0 to m do
j:=Random(10);
if j<5
then n[i]:=-1*j
else n[i]:=j;
write(n[i], ' ')
end;
Writeln;
Writeln('To continue push >>ENTER');
Readln;
if n[i]<0
then s:=s+sqr(n[i])
writeln('s=',s);
readln
{ TODO -oUser -cConsole Main : Insert code here }
end.
program SumSeq;
{$APPTYPE CONSOLE}
uses
SysUtils;
//const m:Integer ;
var
i, j, m, s:Integer;
n: array of Integer;
begin
s:=0;
Writeln(m);
Writeln('vvedite m');
Readln(m);
SetLength(n,m);
for i:=0 to m do
begin
j:=Random(10);
if j<5
then n[i]:=-1*j
else n[i]:=j;
write(n[i], ' ')
end;
Writeln;
Writeln('To continue push >>ENTER');
Readln;
for i:=0 to m do
begin
if n[i]<0
then s:=s+sqr(n[i])
end;
writeln('s=',s);
readln
{ TODO -oUser -cConsole Main : Insert code here }
end.
program months;
{$APPTYPE CONSOLE}
uses SysUtils;var i:Integer;begin Write ('Vvedite nomer mesyaca'); Writeln(i); Readln(i);
case i of 1: Writeln ('January-1,2,3,4,5,6,7,8'); 2: Writeln ('February-22,23'); 3: Writeln ('March-8'); 4: Writeln ('April-net'); 5: Writeln ('May-1,8,9'); 6: Writeln ('June-12'); 7: Writeln ('July-net'); 8: Writeln ('August-net'); 9: Writeln ('September-net'); 10:Writeln ('October-net'); 11:Writeln ('November-4,5,6'); 12:Writeln ('December-net'); end; Readln
{ TODO -oUser -cConsole Main : Insert code here }end.
Там даты (номера) праздничных дней можете подправить, как вам надо!