1)
var
a,i,count:integer;
begin
readln(a);
count:=0;
for i:=1 to a do
begin
readln(a);
if a mod 13 = 0 then
inc(count);
end;
writeln('Count: ',count);
end.
2)
var
a,i,max:integer;
begin
readln(a);
for i:=1 to a do
begin
repeat
readln(a);
if a>100 then
writeln('Error.Repeat');
until a<=100;
if i = 1 then
max:=a
else
if max < a then
max:=a;
end;
writeln('Max: ',max);
end.
ответ: 150
a = ((35 - 5) / 6) * (28 + ((35 - 5)/6) -3) = 5 * (25 + 5) = 150Задание 2:ответ: a=9, b=86
b = ((7 * 11 + 4) div 10) + 6 = (81 div 10) + 6 = 86a = (86 mod 10) + 3 = 6 + 3 = 9Задание 3:ответ: 12
a = 15 - 6 * 2 = 33>15 ? нет => c = 15 - 3 = 12Задание 4:ответ: 173
for k:=7 to 14 do s:=s+2*ks = 5 + 2*(7+8+9+10+11+12+13+14) = 173Задание 5А:НачалоВвод a, ba>b ?если да, то Вывод b*2если нет, то Вывод a*2КонецЗадание 5Б:var a, b: integer;begin readln(a,b); if a>b then writeln(b*2) else writeln(a*2);end.
n=10;
var
i:integer;
a,b:array[1..n] of integer;
c:array[1..n] of real;
begin
Randomize;
for i:=1 to n do begin
a[i]:=Random(20);
Write(a[i]:5);
b[i]:=Random(20);
c[i]:=(a[i]+b[i])/2
end;
Writeln;
for i:=1 to n do Write(b[i]:5);
Writeln;
for i:=1 to n do Write(c[i]:5:1);
Writeln
end.
Пример
12 15 9 18 13 10 6 15 4 11
3 16 3 0 17 0 19 12 0 5
7.5 15.5 6.0 9.0 15.0 5.0 12.5 13.5 2.0 8.0