Вычислить сумму: 1+1/2+1/3+...+1/n
Составить не менее 2 видов цикла
Прошу,пожалуйста, в BASIC-256
Ответы на вопрос
Ответил HAYZRO
1
s=0
for i=1 to a
s=s+1/i
next i
print s
ИЛИ
input a
s=0
n=1
while n<=a
s=s+1/n
n=n+1
end while
print s
for i=1 to a
s=s+1/i
next i
print s
ИЛИ
input a
s=0
n=1
while n<=a
s=s+1/n
n=n+1
end while
print s
Новые вопросы