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