Home
О нас
Products
Services
Регистрация
Войти
Поиск
NDV
@NDV
August 2021
2
17
Report
Помогите по информатике!!!! Пожалуйста! Никак не могу сделать!!!! Задание во вложении. Это не контрольная!!!!
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
Dmon55
Var
k, n, i: integer;
s: real;
begin
read(k, n);
for i := n downto 1 do
s := sqrt(i * k + s);
writeln(s);
end.
0 votes
Thanks 1
archery
рекурсию лучше разворачивать в цикл
archery
Verified answer
Необходимо создать рекурсивную функцию.
Что-то типа:
double foo(int k, int N, double value = 0) {
if (N>0) return foo(k, N - 1, sqrt(k*N + value));
return value;
}
1 votes
Thanks 1
×
Report "Помогите по информатике!!!! Пожалуйста! Никак не могу сделать!!!! Задание во вло..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
k, n, i: integer;
s: real;
begin
read(k, n);
for i := n downto 1 do
s := sqrt(i * k + s);
writeln(s);
end.
Verified answer
Необходимо создать рекурсивную функцию.Что-то типа:
double foo(int k, int N, double value = 0) {
if (N>0) return foo(k, N - 1, sqrt(k*N + value));
return value;
}