Grandi的系列/序列使用R中的for-lime?
如何使用 for-for-for-loop 或 while-loop 来开发100个迭代的系列/序列?
f <- c()
while(length(f) < 100) {
a <- 1
f <- c(f, a)
b <- 0
f <- c(f, b)
}
print(f)
我有正确的输出,但输入与Grandi系列没有通讯。
How can you develop a series/sequence of 100 iterations using a for-loop or a while-loop?
f <- c()
while(length(f) < 100) {
a <- 1
f <- c(f, a)
b <- 0
f <- c(f, b)
}
print(f)
I have the correct output but the input is not correspondent with Grandi's series.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了:
Found how: