
Найти сумму вида 1/2+1/4+1/6..... n раз? Вывести на экран слово "привет" n раз? Прошу, очень
нуждаюсь в помощи, не понимаю ничего!!!! Дам 15 баллов!!

Ответы на вопрос

N,i:integer;
S:real;
Begin
Write('N = ');ReadLn(N);
i:=0;
For N:= 1 to N do
Begin
i:=i+2;
S:=S+1/i;
End;
WriteLn(S)
End.
Var
N:integer;
Begin
Write('N = ');ReadLn(N);
For N:= 1 to N do
WriteLn('привет')
End.



Sum of Fractions
To find the sum of fractions of the form 1/2, 1/4, 1/6, and so on, we can use the concept of harmonic series. The harmonic series is the sum of the reciprocals of positive integers. In this case, we have a harmonic series where the denominators are multiples of 2.The formula to find the sum of the first n terms of a harmonic series is:
S = 1/1 + 1/2 + 1/3 + ... + 1/n
In our case, the denominators are multiples of 2, so the formula becomes:
S = 1/2 + 1/4 + 1/6 + ... + 1/(2n)
To calculate this sum, we can use the formula for the sum of the first n terms of a harmonic series:
S = (1/2) + (1/4) + (1/6) + ... + (1/(2n)) = ln(2n) + γ
where ln is the natural logarithm and γ is the Euler-Mascheroni constant.
Let's calculate the sum for a given value of n.
Word "Привет" Repeated n Times
To display the word "привет" (which means "hello" in Russian) n times on the screen, we can use a loop in a programming language. The specific code will depend on the programming language you are using.Here's an example in Python:
```python n = 5 # Replace with the desired number of repetitions
for _ in range(n): print("привет") ```
This code will print the word "привет" 5 times. You can change the value of `n` to the desired number of repetitions.
I hope this helps! Let me know if you have any further questions.


Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili