Uses crt;
var i,s:integer;
a:array[1..5] of integer;
begin
randomize;
s:=0;
for i:=1 to 5 do
begin
a[i]:=random(15)-5;
if a[i]>0 then s:=s+a[i];
end;
writeln(s);
readln;
end.
uses crt;
var i,s:integer;
a:array[1..7] of integer;
begin
s:=0;
randomize;
for i:=1 to 7 do
begin
a[i]:=random(15)-5;
if ((a[i]>0) and (a[i] mod 2 = 0)) then inc(s);
end;
writeln(s);
readln;
end.
uses crt;
var i,s:integer;
a:array[1..6] of integer;
begin
s:=1;
randomize;
for i:=1 to 6 do
begin
a[i]:=random(15)-5;
if (a[i]>0) then s:=s*a[i];
end;
writeln(s);
readln;
end.
===== PascalABC.NET =====
begin
var (a, b) := ReadReal2('Введите коэффициенты a и b:');
Write('Корень уравнения равен ', -b / a:0:3)
end.
a=input()
for i in range(len(list(a))-1):
print(a[i],end="*")
print(a[i+1])
<h3>PascalABC.NET 3.4.2, сборка 1843 от 24.10.2018</h3>
begin
var s := ReadString;
((s.Count(t -> t in ['a'..'z']) > 0 ? 1 : 0) + (s.Count(t -> t in ['A'..'Z']) > 0 ? 1 : 0) +
(s.Count(t -> t in ['0'..'9']) > 0 ? 1 : 0) + (s.Length >= 8 ? 1 : 0)).Println;
end.