program task31046221;
const
N = 10;
var
s: real;
begin
for var i := 1 to N do
s := s + i * (i+1);
Writeln('S = ', s);
end.
#include <iostream>
using namespace std;
const int N = 10;
int main() {
int S = 0;
for(int i = 1; i <= N; i++)
{
S += i * (i + 1);
}
cout << S;
return 0;
program task31046221;
const
N = 10;
var
s: real;
begin
for var i := 1 to N do
s := s + i * (i+1);
Writeln('S = ', s);
end.
C++#include <iostream>
using namespace std;
const int N = 10;
int main() {
int S = 0;
for(int i = 1; i <= N; i++)
{
S += i * (i + 1);
}
cout << S;
return 0;
}