Перевести с Паскаля на С++
var
s, p: longint;
i, j, n: integer;

begin
Write('Введите n: '); Readln(n);
s := 0;
for i := 1 to n do
begin
p := 1;
for j := i to 2 * i do p := p * j;
s := s + p
end;
Writeln('Сумма равна ', s)
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.