Предмет: Информатика, автор: bubble1414

Паскаль. Найти сумму произведений последовательности чисел S:=1*1+2*2+3*3+4*4...n*n. n введите с клавиатуры.

Ответы

Автор ответа: Аноним
0
program E05;
  uses crt;
    var
      n,S,i: integer;
begin
  clrscr;
  writeln('Введите n: ');
  readln(n);
    for i:=1 to n do
    S:=S+i*i;

  writeln('Ответ: ',S);
end.
Похожие вопросы
Предмет: Обществознание, автор: ugar8271
Предмет: Английский язык, автор: svafoaliev
A: Hi, Emma. (1) __________________ (you / do) that job for Mr Jones? B: No, I (2) ___________ . I (3) __________________ (not have) time. I (4) __________________ (be) so busy this morning. A: (5) __________________ (you / phone) him to ask what’s wrong? B: Yes, I (6) ___________ . A: What’s the problem? B: His screen (7) __________________ (go) blank. He (8) __________________ (not be) able to access any of his files this morning. A: (9) __________________ (he / check) all the cables? B: Yes, he (10) ___________ . They’re all OK. A: I wonder what caused this problem. Any ideas?



A: Hi, Emma. (1) __________________ (you / do) that job for Mr Jones? *
Had you done
Have you did
Have you done
Did you have
Do you done
B: No, I (2) ___________ . *
didn't
haven't
don't
doesn't
I (3) __________________ (not have) time. *
haven't
didn't had
haven’t had
haven’t have
I (4) __________________ (be) so busy this morning. *
've been
was
were
been
A: (5) __________________ (you / phone) him to ask what’s wrong? *
Did you phoned
Have you phoned
Are you phoned
Do you phoned
B: Yes, I (6) ___________ . _ _ _ _ _ _ _ _ _ A: What’s the problem? *
had
have
did
do
B: His screen (7) __________________ (go) blank. *
have gone
has gone
has went
have go
He (8) __________________ (not be) able to access any of his files this morning. *
hadn't be
hadn't been
hasn’t been
haven't was
A: (9) __________________ (he / check) all the cables? *
Has he check
He has checked
Checked he
Has he checked
B: Yes, he (10) ___________ . They’re all OK. *
has
do
did
does