1+2+3+...+100
姓名
2025年4月9日
采用for循环完成,代码如下:
for
total <- 0 for (i in 1:100) { total <- total + i } total
[1] 5050