program SumSquares; var n, i: integer; y: real; begin write′Enterthevalueofn:′'Enter the value of n: '′Enterthevalueofn:′; readlnnnn; y := 0; for i := 1 to n do begin y := y + 1 / sqriii; end; writeln′Thevalueofyis:′,y:0:2'The value of y is: ', y:0:2′Thevalueofyis:′,y:0:2; end.
Введите значение переменной n, чтобы программа вычислила значение переменной у.
var
n, i: integer;
y: real;
begin
write′Enterthevalueofn:′'Enter the value of n: '′Enterthevalueofn:′;
readlnnnn;
y := 0;
for i := 1 to n do
begin
y := y + 1 / sqriii;
end;
writeln′Thevalueofyis:′,y:0:2'The value of y is: ', y:0:2′Thevalueofyis:′,y:0:2;
end.
Введите значение переменной n, чтобы программа вычислила значение переменной у.