Var
Ch,Z:real;
i:integer;
Begin
Ch:=0;
For i:= 1 to 100 do
if i mod 7 = 0 then Ch:=Ch+i;
Z:=0;
For i:= 100 to 500 do
if i mod 17 = 0 then Z:=Z+i;
WriteLn(Ch,'/',Z,' = ',Ch/Z);
End.
Результат работы программы:
735/7140 = 0.102941176470588
37 div 10 = 3
58 div 10 = 5
125 div 10 = 12
234 div 10 = 23
873 div 100 = 8
3985 div 1000 = 3
37 mod 10 = 7
58 mod 10 = 8
125 mod 10 = 5
234 mod 10 = 4
873 mod 100 = 73
3985 mod 1000 = 985
Var a:array [1..5, 1..5] of integer;
s,i,j:integer;
begin
s:=0;
for i:=1 to 5 do
for j:=1 to 5 do
begin
read(a[i,j]);
if (i mod 2=0) and (j mod 2=0) then s:=s+a[i,j];
end;
writeln(s)
end.